This code inserts the featured image after the first sub heading as long as its wrapped in h2 tags.
You can change the code to insert after other heading tags simply by changing the h2 in the code to something else like h3 or h4.
Register or login to access the code :
Related Tutorials
- Simple PHP Regex To Insert Featured Image Before 1st H2 Tag
- Add Featured Image After Paragraph
- How To Add Featured Image Before 1st H2 Tag In Any WordPress Theme
Was this helpful?
Thanks for your feedback!


Leave a Reply
You must be logged in to post a comment.