WP Manifestindependent plugin directory
manifest / content / rh-free-layouts

RH Free Layouts

Drag&Drop layouts for WordPress

by Rasso Hilber · github.com/hirasso/rh-free-layouts

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.zip

Readme

How to use

  • Activate the plugin
  • Add a field with type Free Layout to your ACF Flexible Content or Repeater.
  • Optionally add a field with type Reset Free Layouts to 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'
  });
}

Read the full README on GitHub →