Custom Fields
Re-Envisioned
Support General Does this field type exist?

  • Creator
    Topic
  • #20953
    Resolved wgstjf
    Participant

    Hi,

    Quick one – on one of your tutorials () you show the ‘post’ field type with the functionality I am trying to create for a custom array of options. Is there a field type that I can use to achieve this? Haven’t found one yet but still hoping 🙂

    Example field type

    Thanks,

    Will

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #20959
    Long Nguyen
    Moderator

    Hi Will,

    You can follow this documentation to create the field post and add the setting 'multiple' => true to select multiple posts.
    https://docs.metabox.io/fields/post/

    'fields' => array(
        array (
            'id' => $prefix . 'post',
            'type' => 'post',
            'name' => esc_html__( 'Post', 'text-domain' ),
            'post_type' => 'page'
            'field_type' => 'select_advanced',
            'multiple' => true,
        ),
    )

    screenshot in MB Builder https://share.getcloudapp.com/6qu2dN68.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.