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 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.
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!
thank you for replying as well. I’ll start thinking about an elegant way to offer this functionality.
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!
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.
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/ (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.
P.S. I’ve added a PayPal Donate button at http://blog.dianakoenraadt.nl
Diana this is incredible, it’s working perfectly!
Thank you so much for your effort, really: you are a genius…
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?
Sorry, just found the instructions here: http://wordpress.org/plugins/category-posts-in-custom-menu/ – I’ll give it a go!
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!
Don’t worry about that, we had fewer than we originally thought. It’s brilliant – well done!!
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, could that be applicable to your case?
- Category link
- The topic ‘Display only when post(s) assigned’ is closed to new replies.