Support » Fixing WordPress » register_post_type() show_ui confusion.

  • Resolved TulsaWeb

    (@tulsaweb)


    I’ve created a custom post type which I want to edit in the dashboard, but not show as a choice in menus.

    when using register_post_type() I must choose

    show_in_menu => true

    to see an edit tab in the dashboard but then it is also available in menus.

    If I choose:

    show_ui => true,
    show_in_menu => false,

    There is no edit page in the dashboard.

    Perhaps a bug?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Check out this blog post, I think this will help.

    Thanks, LBT.

    I see my error now. I wanted the UI to show to edit the post type, but I didn’t want the post type to show as a choice when adding items to menus.

    show_in_menu wasn’t the right argument. show_in_nav_menus had no effect.

    Instead, public = false and show_ui = true did the job. show_in_menu was not needed.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘register_post_type() show_ui confusion.’ is closed to new replies.