Select 'Page' does not work

Support MB Builder Select 'Page' does not work

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2502
    CLOUD MeisterCLOUD Meister
    Participant

    We'd like to add a field to select a page for grouping & outputting several custom post types on this page. But unfortunately, for some reason we can't get a select box working which is displaying all WordPress pages. See the following screenshot for the query we tried:
    https://drive.mandelkind.cloud/index.php/s/3dqLzLovBta04VQ

    #2509
    Tan NguyenTan Nguyen
    Participant

    Dear mandelkind,

    Thanks for reporting that bug, Meta Box plugin itself updated the code and post_type now becomes property of field instead of field.query_args. So you'll have to define field like so:

    
    'type' => 'post',
    'name' => 'Page Dropdown',
    'id' => 'page',
    // note that
    'post_type' => 'page'
    // instead of
    'query_args' => [
        'post_type' => 'page'
    ]
    

    We'll release an update for MB Builder, currently, in this version, you can do it by using Custom Attribute, like this example:

    http://prnt.sc/agankf

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Select 'Page' does not work’ is closed to new replies.