• Resolved lovebrands

    (@lovebrands)


    Hi,

    I want the option page in the admin menu to be shown under a custom post type as in the sub menu. I tried several things under “Edit option page” > “Position” and “Parent slug” but can’t get it working.

    post_type=vacatures

    I hope anybody could help me out.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    It’s easy, simply set the “Parent Slug” as the URL of the menu you’re targeting, without the https://www.domain.com/wp-admin/ part.

    In your case edit.php?post_type=vacatures
    See screenshot: https://i.imgur.com/MGHeiWU.png

    BTW, if you want to create an Options Page for the Vacatures Post Type Archive, there is a feature in ACF Extended that will automatically create it for you, and set it as a Post Type submenu.

    You can find that setting in the admin menu Tools > Post Types > Your Post Type > “Admin” tab.

    See screenshot: https://imgur.com/a/JEmMnOx

    This will create a virtual Options Page, where you can assign a Field Group like any normal Options Page.

    See Field Group condition screenshot: https://i.imgur.com/RgpRHqm.png

    The values will be saved in the post id: my-post-type_archive. So in your case, you will be able to retrieve field values using: get_field('my_field', 'vacatures_archive') 🙂

    Note: If you registered your post type manually in PHP without the Dynamic Post Types UI, you can still use that feature, just add the following argument in your post type registration:

    
    register_post_type('my-post-type', array(
        'label'                 => 'My Post Type',
        'description'           => '',
        'hierarchical'          => false,
        'public'                => true,
        'acfe_admin_archive'    => true, // Enable ACF Extended: Archive Options Page
    ));
    

    Hope it helps 🙂

    Have a nice day!

    Regards.

    Thread Starter lovebrands

    (@lovebrands)

    Perfect! This was very helpful. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Option page menu position under custom post type’ is closed to new replies.