Archived topic
Possible to Add a Hook Element After a Given HTML Element
3 replies · Started by Lewis on January 21, 2022
Let's say I have an HTML element in the middle of a blog post .featured-box and I want to add a hook element that contains a search form directly after this, is this possible?
Blog post is:
SOME CONTENT
HTML ELEMENT (.featured-box added as a container block in the post editor)
MORE CONTENT
I want to insert an element after this HTML element but without editing each post as I want to add it instantly to all posts on the site so don't want to have to go through each post manually.
Cheers!
Hi there,
No. You can use a plugin like Ad Inserter which can filter your content and insert 'stuff' at a place you specify, including : Insert before or after any HTML element using CSS selectors
Well that's obvious when I have that plugin already on the site! Cheers for that :)
Great - glad to be of help!