Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Extract H2 and add ID

  • Hi there,

    We have an objective is to auto populate all of the H2s on a post and list them in the sidebar widget as Table of contents. We do not want to use a plugin nor want to touch 500+ posts to updated H2s.

    Is this possible?

  • Hi there,

    Not sure what you mean, you will need a TOC plugin for that.

  • Possible to do this without a plugin and with custom code?
    We also need this to auto populate as we have over 500 posts to go through.

    I know it’s possible to extract H2s into a list and to populate H2 text into ID but just not sure how to piece them together.

  • Yes, you can write custom code for this.

    But we can not help with that, unfortunately!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.