I just have the problem that I want to add some HTML to every post – above the title.
I found the hook
the_title– with this it is possible to add something INTO the post title, but not before it.
The problem is that the theme puts the post title into <h2> tags, so everything I prepend to the title with a filter based on the_title hook is within these <h2> tags, too.
The only possibility is for me to use PHP as an addition of the functions.php. It is not possible to modify the theme itself or use a child theme, so please don’t make that advise.
So my question is, if anyone knows a possibility / hook / etc. to write some HTML right on top of the post via functions.php – above the title.
Very many thanks in advance,
- Das Thema „Add HTML content right before post title via functions.php“ ist für neue Antworten geschlossen.