WordPress.org

Ready to get started?Download WordPress

Forums

Content Headings Tree
[resolved] Only display if headers are present. (3 posts)

  1. Colm Doyle
    Member
    Posted 1 year ago #

    One other suggestion for you ;)

    If there's no headers in the content and you therefore won't be generating anything, don't render the plugin at all.

    Some pages on my site have sub-headings, others don't, so it only makes sense to display if there's something useful to show. I've done a basic hack for myself, but you might want to make it an option or something. Here's the code I put in -

    https://gist.github.com/4158566

    The relevant code is the if block on line 47.

    http://wordpress.org/extend/plugins/content-headings-tree/

  2. Konstantinos Kouratoras
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you so much for your feedback! Just released an update:

    • If no headings in content, no widget at all
    • Added option to display widget only in posts and pages
  3. Colm Doyle
    Member
    Posted 1 year ago #

    Awesome, thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.