Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tom

    (@edge22)

    Hi there,

    The Headline block saves as static HTML (so your HTML is retained if you ever deactivate GenerateBlocks), so it’s not possible to dynamically filter inside of it without using some pretty advanced PHP to search/replace, or DOMDocument.

    What are you wanting to do?

    Let us know ??

    Thread Starter ashf

    (@ashf)

    I see.

    I was thinking something like dynamic content, such as showing the title or meta fields.
    Also for a IDX plugin that pulls data from outside of WP dynamically.

    Plugin Author Tom

    (@edge22)

    To do that, you would need to use the render_block filter.

    Then, you’d need to use a PHP function like str_replace(), which would allow you to replace the text (you’d need to know what to search for) with your dynamic function to output something like the title or meta. This is what we do in GeneratePress for our dynamic blocks: https://docs.generatepress.com/article/dynamic-data/

    Thread Starter ashf

    (@ashf)

    Thank you.
    I’ll try that.

    Plugin Author Tom

    (@edge22)

    You’re welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Filter hook for GB Headline block?’ is closed to new replies.