Adding the Custom to WordPress as a CMS
The new WYSIWYG interface for creating fields is a quick and easy way of exploring the plugin and works extremely well for small projects, but sometimes it's more flexible and much faster to create fields through code.
Ultimate Fields provides a semantic interface for creating containers and fields directly through code. The complete documentation is always trying to educate developers on the available methods, properties and hooks.
use Ultimate_Fields\Container;
use Ultimate_Fields\Field;
add_action( 'uf.init', function() {
Container::create( 'page-settings' )
->add_location( 'post_type', 'page' )
->add_fields([
Field::create( 'select', 'layout' )
->set_input_type( 'radio' )
->add_options(array(
'boxed' => 'Boxed',
'wide' => 'Wide'
))
]);
});
With most containers within Ultimate Fields you can choose if the container should be boxed or seamless, change the position of the labels and descriptions, group fields in tabs, add sections and much more.
All of this contributes to nice-looking and logically laid-out fields, easiliy maneuverable for your editors.
The complete interface of Ultimate Fields is based on the Backbone.js JavaScript framework and makes it the most seamess and dynamic experience in the industry.
Conditional logic, validation, popups and more - it is all made better by utilizing dynamic scripts, rather than server-side generated HTML.
Modern websites have a lot of custom fields and sometimes they can be confusing for users. With conditional logic, you can only toggle the fields you need and perfect your customers' experience.
In Ultimate Fields 2 you can define groups of conditional logic rules, which do not only work on the same level, but also with parent fields.
Since WordPress 4.4 the REST API has been included in core. Now it is also supported by Ultimate Fields. You can manage fields with a single method in PHP and a single button click in the interface!
With the upcoming merge of the Gutenberg editor into core, this is a must for every developer, which uses custom fields in their workflow.