Archived topic
Hook to add a h1 tag in posts page
1 reply · Started by Jenny Dupuy on March 18, 2020
Hi,
I'm using GP + GP premium in the last versions.
Context: I develop a showcase site with several static pages and a page presenting the company's customer references.
These customer references are each presented in a post with a featured image.
In the Settings > Reading, I indicated: Your homepage displays a static page, and I selected Homepage = the page named Home, and for Posts page = the page named References (which does not contain any content).
The homepage displays correctly the content of Home page, and the page References displays the list of post with masonry grid.
It works well but there is a missing h1 tag on the references page (posts page).
I decided to add it via a hook.
In Elements, I add new hook, and I configured like this:
Could you confirm that this is the best method? Is the inside-container hook correct?
Is there a better method that meets the code's good practices?
Thanks for help.
Hi there,
that is a very good method of adding the title.