- This topic has 13 replies, 3 voices, and was last updated 1 year, 2 months ago by David.
February 9, 2020 at 9:48 am #1159808Michael
I have set up my Blog page to display the posts on my site. However in so doing it removed the HTML code I had set up on the page to display the page title as per the other pages. I cannot see any way to add the HTML code back in – please could you tell me how I go about doing this?February 9, 2020 at 11:41 am #1159873LeoStaffCustomer SupportFebruary 9, 2020 at 11:44 am #1159877Michael
Sorry, the page is now:
I’d like to add this at the top of the page as per the other pages:
<table class="header"> <tbody> <tr> <td class="center"> <header> <h1>Blog</h1> </header> </td> </tr> </tbody> </table>February 9, 2020 at 11:54 am #1159893LeoStaffCustomer Support
How are you adding it on other pages? Just inside the content?
The posts page cannot be edited like a normal static page so you’d need to use a hook with hook elements:
https://docs.generatepress.com/article/hooks-visual-guide/February 9, 2020 at 12:34 pm #1159933Michael
Hi Leo, I just added html on other pages via the page edit area in the WP dashboard. I just need to add the title to the blog page as it’s the only one missing. Can I do that with a hook?February 9, 2020 at 12:49 pm #1159942LeoStaffCustomer Support
Yup either hook element or header element should both work:
https://docs.generatepress.com/article/header-element-overview/February 9, 2020 at 2:57 pm #1160018Michael
Hi Leo, um, please can I get some help with how to code that just for the blog page? My brain is flat-lining 😉February 9, 2020 at 3:16 pm #1160030LeoStaffCustomer Support
Try creating a header element, add that as the page hero content:
Under the display rules, select Blog as Location.February 10, 2020 at 2:33 am #1160300Michael
For some reason I don’t see the menu option mentiond:
To create a new Header Element, go to Appearance > Elements and click “Add New”. From the Element dropdown list, choose “Header”.February 10, 2020 at 2:33 am #1160302Michael
Is there a plugin I need or something like that? I had to turn off a bunch of plugins whilst troubleshooting site stuff. I left the GP one one thoughFebruary 10, 2020 at 2:39 am #1160305Michael
Sorry Leo, I have found it. It works but I was hoping to place the header underneath the social media icons as per my other pages eg:February 10, 2020 at 6:59 am #1160673DavidStaffCustomer Support
you can use a Hook Element instead of the Header Element – the
before_main_contenthook should put it in the right place.
If that is the same hook you have for your social icons then increase the Priority value of this new hook to move it below.February 10, 2020 at 8:20 am #1160763Michael
Hi David, you’re a legend Sir. That works too. Thank you very much – you are saving what little hair I have left 😉February 10, 2020 at 8:24 am #1160768
- You must be logged in to reply to this topic.