CPT Auto Menu now handles multiple custom post types

Version 1.1.0 of my Custom Post Type Auto Menu plugin is out, and I am happy to say it now handles multiple custom post types. This is a feature that was requested, and frankly does make a lot of sense. It took quite a bit of reconfiguring, so any previous users of the plugin will have to re-do their settings in order to make it work, even if they just update it (sorry about that!). But with only a single custom post type, that is an easy fix.

In the announcement post I explained how the plugin works. It is still basically the same, except that multiple post types, and therefore multiple menus and parent menu items can be selected.

An image of the CPT Settings screen

In this example three custom post types have been chosen: Motorycle, House and Project. After selecting CPTS’s it is neccessary to save in order to launch the Menu Settings tab.


An image of the Menu Settings tab

We now have a menu and parent menu selection to make for each custom post type. The parent menu item is required in order to create a submenu item, and have the CPT propogate down, rather than across the menu. Once the required settings have been selected, save the page and go ahead and add new custom post types.

Now new custom post type posts are automatically added to the menu. Easy!

There are a couple of limitations which I will work on for future versions. One is that bulk trashing custom post type posts will not remove them from the menu. Only one at a time will work. Also, posts can not have the same name, even if they are going to different menus.

Hope you enjoy it, and leave your comments!

Custom Post Type Auto Menu: WordPress repository

On Github

2 comments

  1. Roman

    I’m using your plugin. It works like a charm.
    But I really need one more feature.

    As you can see, I’m also using Polylang for multilingual features. So I have two (or more) different posts for one item (one per language). They have different names, but one custom post type.

    And also (again!) I have two Primary navigation menus (one per language) where I would like to automatically add posts to submenu.

    Now I have opportunity to assign one CPT to only one Navigation Menu.
    I need the opportunity to assign one CPT to few Navigation Menus.

    Is it real to make an update for this? Or give me some ideas how to fix this in plugin core files. Thanks.

    • Ken Dirschl

      hi Roman,
      I’m so sorry I did not see this comment until now. Not sure why; I must have overlooked the notice.

      I understand what you are trying to do. By now you probably have a fix. If not I will take a look at how to implement this, even as a patch.
      thanks,
      Ken

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>