Custom Fields
Re-Envisioned
Support MB Settings Page Post_Type argument for Post field type

  • Creator
    Topic
  • #18126
    Resolved candorem
    Participant

    Hello, I can’t get the post_type argument to work for a post field type on a settings page.

    array(
                'name'    => __( 'Featured Event(s)', 'rwmb' ),
                'id'      => "event_archive_featured_events",
                'type'    => 'post',
                'post_type'=>array('event'),
                'field_type'  => 'select_advanced',
                'clone'  => true,
                'sort_clone' => true,
                'max_clone' =>3,
    
            ),
Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #18142
    Anh Tran
    Keymaster

    Hi, I’ve just tried your code and see it works well. Can you please provide more details on the bug?

    #18259
    candorem
    Participant

    It always only loads in the page post type into the select box, no matter what I do.

    #18268
    Anh Tran
    Keymaster

    Ah, the post_type parameter for the post field specify which post type it uses to get posts from.

    It’s not the post type screen. To set the meta box appear for specific post types, you must set post_types param for the meta box. Please see this docs.

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