WordPress.org

Ready to get started?Download WordPress

Forums

Category Posts in Custom Menu
[resolved] Display only when post(s) assigned (14 posts)

  1. nmvdvjr
    Member
    Posted 9 months ago #

    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/

  2. Diana Koenraadt
    Member
    Plugin Author

    Posted 9 months ago #

    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

  3. Joe
    Member
    Posted 9 months ago #

    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!

  4. Diana Koenraadt
    Member
    Plugin Author

    Posted 9 months ago #

    Hi Joe,

    thank you for replying as well. I'll start thinking about an elegant way to offer this functionality.

    Kind regards,
    Diana

  5. nmvdvjr
    Member
    Posted 9 months ago #

    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

  6. Diana Koenraadt
    Member
    Plugin Author

    Posted 9 months ago #

    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

  7. Diana Koenraadt
    Member
    Plugin Author

    Posted 8 months ago #

    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.

    Kind regards,
    Diana

    P.S. I've added a PayPal Donate button at http://blog.dianakoenraadt.nl

  8. nmvdvjr
    Member
    Posted 8 months ago #

    Diana this is incredible, it's working perfectly!

    Thank you so much for your effort, really: you are a genius...

  9. Joe
    Member
    Posted 8 months ago #

    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?

  10. Joe
    Member
    Posted 8 months ago #

    Sorry, just found the instructions here: http://wordpress.org/plugins/category-posts-in-custom-menu/ - I'll give it a go!

  11. Joe
    Member
    Posted 8 months ago #

    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!

  12. Joe
    Member
    Posted 8 months ago #

    Don't worry about that, we had fewer than we originally thought. It's brilliant - well done!!

  13. Diana Koenraadt
    Member
    Plugin Author

    Posted 8 months ago #

    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?

    Kind regards,
    Diana

  14. Diana Koenraadt
    Member
    Plugin Author

    Posted 8 months ago #

    Marking this topic as closed.

Reply

You must log in to post.

About this Plugin

About this Topic