• Resolved istvand

    (@istvand)


    Hi,

    Thank you for this great plugin, it makes ACF even more awesome!

    I have the following issue:
    Under Tools => Post Types I have added several PTs and overall they are working good, but I can’t figure out how to add these under the main menu of WP. The new PTs can be accessed via Tools => Post Types => View, but that’s all, they are not appearing under/before the other elements, e.g. Pages.

    My logic says that the Menu tab is for this, but my PTs just don’t want to show up.

    I have tried this in a fresh WP install with the standard TT1 theme and no other active plugins out of the latest version of ACF PRO and ACFE.

    Thank you!

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

    (@hwk-fr)

    Hello,

    Thanks for the feedback! I just tested the feature, and it works correctly. Here is a video demo with a simple Post Type: https://i.imgur.com/jK9ofxp.mp4

    Maybe your theme have some custom custom code which hide posts types/change the menu? You can try to use the native WordPress Twenty Twenty One theme to makes sure it isn’t the theme fault.

    Also please check your Post Type arguments, it should be “Public”, and also have “Show in Menu” enabled. You can try to create a “Test” Post Type like in my video without touching any other settings, it should work. You’ll find more information about Post Types arguments on the WordPress documentation: https://developer.wordpress.org/reference/functions/register_post_type/

    Hope it helps!

    Regards.

    Thread Starter istvand

    (@istvand)

    Hi Konrad,

    Figured it out, thanks!

    The issue was that I always filled in the “Show in menu (text)” option, before hitting save. Not only this, but I have completely misunderstood this option (I think).

    View post on imgur.com

    Thank you once more!

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    I’m glad to hear that you fixed your issue!

    Yes there is two “Show in menu” & “Show in menu text” settings (Show in menu has to be enabled). This is because WordPress allow this parameter to be either false, true, or text, as explained in the documentation: https://developer.wordpress.org/reference/functions/register_post_type/#show_in_menu

    show_in_menu
    (boolean or string) (optional) Where to show the post type in the admin menu. show_ui must be true.

    Default: value of show_ui argument

    ‘false’ – do not display in the admin menu
    ‘true’ – display as a top level menu
    ‘some string’ – If an existing top level page such as ‘tools.php’ or ‘edit.php?post_type=page’, the post type will be placed as a sub menu of that.

    The “Show in menu text” let you set the Post Type as a menu under an another existing menu. For example, if you set tools.php the post type will be displayed under the “Tools” menu. You should leave it empty if you want your Post Type to be a top level menu.

    Have a nice day!

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom Post Types in admin menu’ is closed to new replies.