Title: Display only when post(s) assigned
Last modified: August 21, 2016

---

# Display only when post(s) assigned

 *  Resolved [Nick van de Veerdonk](https://wordpress.org/support/users/nmvdvjr/)
 * (@nmvdvjr)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/)
 * Hi Diana,
 * Thanks for this fantastic plugin, great work! (why is this function not part 
   of WordPress?!)
    Is it possible to add a bit of code to hide the categories in
   the menu that don’t have posts assigned to them? If yes, could you help me on
   my way with this?
 * Thanks again,
    Nick
 * [http://wordpress.org/extend/plugins/category-posts-in-custom-menu/](http://wordpress.org/extend/plugins/category-posts-in-custom-menu/)

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

 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946604)
 * Hi Nick,
 * thanks for your message. I’m glad to hear you find my plugin useful 🙂
 * I understand that you’ve made the following menu structure:
    - Category link
 *  - Category posts, by my plugin
 * And if there are no posts, you want the category link to disappear?
 * You’re right, at the moment my plugin doesn’t do that, it’s lean and mean 😉 
   I could extend it so that this is generated automatically, i.e. that it creates
   the top level “Category link” for you automatically if you check an additional
   checkbox?
 * Let me know if this is what you want.
 * Kind regards,
    Diana
 *  [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946605)
 * I’m looking for exactly this functionality too – please add it if you have the
   time! We have a huge list of categories and lots are not used (yet) so just listing
   those with posts would be amazing!
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946606)
 * Hi Joe,
 * thank you for replying as well. I’ll start thinking about an elegant way to offer
   this functionality.
 * Kind regards,
    Diana
 *  Thread Starter [Nick van de Veerdonk](https://wordpress.org/support/users/nmvdvjr/)
 * (@nmvdvjr)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946607)
 * Hi Diana!
    Thanks for your quick reply, the case is this: I’m making a foto album
   for all the sundays I see my son so he can look back at our days during the week.
   The structure of the menu is Year (custom)/ Month (cat.)/ Day (post). It would
   be great if months were only displayed when a post is in it, because its less
   messy but especially because I write posts for him when dating next year(s). 
   If you add this function, why not make it a premium pne? I’m sure there are many
   users who would enjoy it? Regardless I will make a donation to show my appreciation!
 * Nick
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946608)
 * Hi Nick,
 * thanks for your reply. Thanks for the suggestion of making it a Premium functionality.
   For me, it is not the right course of action right now, because my time to offer
   support is very limited.
 * Also, thank you for offering to make a donation, I appreciate that. You’re the
   first to have offered this. I will consider putting up a Paypal / Donate button
   somewhere.
 * Kind regards,
    Diana
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946656)
 * Hi Joe and Nick,
 * I’ve added the requested functionality. It is not yet included in the latest 
   stable version.
 * If you are able, I kindly request you to grab the current development version
   from [http://wordpress.org/plugins/category-posts-in-custom-menu/developers/](http://wordpress.org/plugins/category-posts-in-custom-menu/developers/)(
   click “Development version” to download a .zip package) and test this.
 * I’ve renamed the main checkbox to “Create submenu containing links to posts with
   this tag.” and added the option to “Remove original menu item” which defaults
   to the original behavior “Always”, but can now be also set to “Only if there 
   are no posts” or “Never”.
 * I hope that this satisfies your requirements and that you can find the time to
   let me know if you encounter any problems. If you encounter no problems, it will
   be included in the next stable version.
 * Kind regards,
    Diana
 * P.S. I’ve added a PayPal Donate button at [http://blog.dianakoenraadt.nl](http://blog.dianakoenraadt.nl)
 *  Thread Starter [Nick van de Veerdonk](https://wordpress.org/support/users/nmvdvjr/)
 * (@nmvdvjr)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946657)
 * Diana this is incredible, it’s working perfectly!
 * Thank you so much for your effort, really: you are a genius…
 *  [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946658)
 * Diana, I can’t wait to try this – thanks for your hard work (rapid too!). However,
   I’ve TOTALLY forgotten how to implement this in a menu. I’ve activated the plugin…
   now what?
 *  [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946659)
 * Sorry, just found the instructions here: [http://wordpress.org/plugins/category-posts-in-custom-menu/](http://wordpress.org/plugins/category-posts-in-custom-menu/)–
   I’ll give it a go!
 *  [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946660)
 * This is great Diana, exactly what we were looking for. Our problem is we have
   43 categories… and WordPress removes menu items something like after 34 items–
   as a cheeky side question, any ideas how to remove this limitation? It would 
   really complete this. Thank you!
 *  [Joe](https://wordpress.org/support/users/joewa1980/)
 * (@joewa1980)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946661)
 * Don’t worry about that, we had fewer than we originally thought. It’s brilliant–
   well done!!
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946662)
 * Nick, thanks for your feedback, I’ll include the change in the stable version.
 * Joe, thanks for your messages, glad you found it useful. As for the menu limit,
   there’s a topic on that here: [WordPress.org WP 3.0 Menu limit](http://wordpress.org/support/topic/wp-30-menu-limit?replies=12),
   could that be applicable to your case?
 * Kind regards,
    Diana
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946663)
 * Marking this topic as closed.

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

The topic ‘Display only when post(s) assigned’ is closed to new replies.

 * ![](https://ps.w.org/category-posts-in-custom-menu/assets/icon-128x128.png?rev
   =2539336)
 * [Category Posts in Custom Menu](https://wordpress.org/plugins/category-posts-in-custom-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-posts-in-custom-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-posts-in-custom-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/category-posts-in-custom-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-posts-in-custom-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-posts-in-custom-menu/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/display-only-when-posts-assigned/#post-3946663)
 * Status: resolved