Post_Type argument for Post field type

Support MB Settings Page Post_Type argument for Post field typeResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18126
    candoremcandorem
    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,
    
            ),
    #18142
    Anh TranAnh Tran
    Keymaster

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

    #18259
    candoremcandorem
    Participant

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

    #18268
    Anh TranAnh 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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.