The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Advanced Menu Widget
[resolved] diff to only show the widget when there are pages to show. (7 posts)

  1. tmuka
    Posted 4 years ago #

    I made this small patch to fit my use case where I only want to show the widget on pages when it will show child pages. I didn't like the default behavior where there would be an empty widget ul when there were no pages to list.

    Feel free to use/adapt/modify this code... Thanks for writing this great plugin so i didn't have to!

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. tmuka
    Posted 4 years ago #

    oops. here's the pastebin link... http://pastebin.com/auQyLyZy

    please let me know if you have any questions :)

  3. Sebastian Cork
    Posted 4 years ago #

    Thanks for sharing. I hope to see this included in a future update of the plugin.

  4. mashasauer
    Posted 3 years ago #

    Hi tmuka,
    I need to do the same thing and not show the widget if it's empty. Can you please resend the code as this link above is not working any more.
    Thank you.

  5. tmuka
    Posted 3 years ago #

    Hey mashasauer,

    Sorry, seems pastebin automatically expires old content or something. I don't even remember which site i did this for anymore. I'll have to dig around and see if i can find my code.

  6. mashasauer
    Posted 3 years ago #

    Hi tmuka, thank you for your quick response.

    it would be great if you could find it, as I really need to do this and I haven't found much on this topic.

    Thanks anyway for trying.

  7. MWB
    Posted 3 years ago #

    hi tmuka!
    just found this thread because i am running into the same problem - would you be able to share the code again? many thanks in advance!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Menu Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic