WP Manifestindependent plugin directory
manifest / content / ultimate-fields-layout-control

Ultimate Fields: Layout Control

This plugin allows the values of repeatable fields (repeater & layout) to be saved as layout and reused later.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/radoslavgeorgiev/ultimate-fields-layout-control/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Ultimate Fields: Layout Control Field

This is an extension for Ultimate Fields that introduces an additional field type, called "Layout Control".

The Layout Control field does not save its own values, but allows the values of "Repeater" and "Layout" fields to be saved as templates.

Installation

Make sure that you are using Ultimate Fields 3.0.2+ and clone this repository as a plugin.

Usage

In the user interface, simply add the Layout Control field next to a repeater or a layout field and select the field that you want to control.

In PHP, do it like this:

use Ultimate_Fields\Container;
use Ultimate_Fields\Field;

Container::create( 'post-layout' )
    ->add_fields(array(
        Field::create( 'repeater', 'blocks' )
            // ->add_group( ... )
            // ->add_group( ... )
            ,
        Field::create( 'layout_control', 'blocks_control', 'Layout Control' ) )
            ->set_field( 'blocks' )
    ))

Storage

All layouts are stored within an ui-less custom post type called uf-layout.