Support » Plugin: Content Headings Tree » Only display if headers are present.

  • Resolved Colm Doyle


    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 –

    The relevant code is the if block on line 47.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only display if headers are present.’ is closed to new replies.