Fieldmanager is a toolkit for developers to create complex administration screens in WordPress.

Installation

The best way to install Fieldmanager is to clone the Github repository and add it to your plugins directory (as a submodule, if you are using Git to manage your project).

Hello, Fieldmanager

<?php
add_action( 'fm_post_post', function() {
  $fm = new Fieldmanager_Group( array(
    'name' => 'contact_information',
    'children' => array(
      'name' => new Fieldmanager_Textfield( 'Name' ),
      'phone' => new Fieldmanager_Textfield( 'Phone Number' ),
      'website' => new Fieldmanager_Link( 'Website' ),
    ),
  ) );
  $fm->add_meta_box( 'Contact Information', 'post' );
} );

Result:

Building a slideshow with Fieldmanager

This example demonstrates some of Fieldmanager’s advanced features, like repeating groups of fields, sortable groups of fields, and label macros:

<?php
add_action( 'fm_post_post', function() {
  $fm = new Fieldmanager_Group( array(
    'name' => 'slideshow',
    'limit' => 0,
    'label' => 'New Slide',
    'label_macro' => array( 'Slide: %s', 'title' ),
    'add_more_label' => 'Add another slide',
    'sortable' => true,
    'children' => array(
      'title' => new Fieldmanager_Textfield( 'Slide Title' ),
      'slide' => new Fieldmanager_Media( 'Slide' ),
      'description' => new Fieldmanager_RichTextarea(
        'Description'
      ),
    ),
  ) );
  $fm->add_meta_box( 'Slides', 'post' );
} );

Result:

Fieldmanager slideshow example