Skip to content
mattheu edited this page Apr 11, 2013 · 12 revisions

Post select field. Displays a select input allowing the user to select a post.

By default, the last 5 posts are available. It is reccommended to use the 'use_ajax' argument, to populate the field options.

Post Select Field

Uses Select2, a jQuery based replacement for select boxes.

Args

  • id string (required)
  • type 'post_select' (required)
  • use_ajax bool
  • repeatable bool
  • cols int [1-12]

Example Usage

array( 
	'id'       => 'example-field-post-select', 
	'name'     => 'Post Select Field', 
	'type'     => 'post_select', 
	'use_ajax' => true
);