RH Free Layouts
Drag&Drop layouts for WordPress
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/hirasso/rh-free-layouts/archive/refs/heads/main.zipReadme
How to use
- Activate the plugin
- Add a field with type
Free Layoutto your ACFFlexible ContentorRepeater. - Optionally add a field with type
Reset Free Layoutsto your post
Wrap your module or repeater row like this:
<?php ob_start(); ?>
<div class="my-module">This module will support free layout</div>
<?php echo function_exists('rhfl') ? rhfl()->wrap_item( $value, ob_get_clean() ) : ob_get_clean() ?>
Initiate the edit mode from your php template (after all items have been rendered):
if( function_exists('rhfl') ) rhfl()->get_edit_mode_js();
For full control over context and options, you can also initiate RHFL using JavaScript:
if (window.RHFL != null) {
window.RHFL.initEditMode({
containerElement: document.querySelector('.my-free-layout'),
groupSelector: '.my-group'
});
}