- This topic has 13 replies, 3 voices, and was last updated 4 years, 2 months ago by David.
-
AuthorPosts
-
February 9, 2020 at 9:48 am #1159808Michael
Hi all,
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 SupportHi there,
I’m not sure if I understand.
What code are you trying to add to the blog page?
The link above shows “default backend – 404” to me.
February 9, 2020 at 11:44 am #1159877MichaelHi Leo,
Sorry, the page is now:
https://reclaimdesign.org/blog.html/
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 SupportHow 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-element-overview/
https://docs.generatepress.com/article/hooks-visual-guide/February 9, 2020 at 12:34 pm #1159933MichaelHi 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 SupportYup either hook element or header element should both work:
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/header-element-overview/February 9, 2020 at 2:57 pm #1160018MichaelHi 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 SupportTry creating a header element, add that as the page hero content:
https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-1-add-the-contentUnder the display rules, select Blog as Location.
February 10, 2020 at 2:33 am #1160300MichaelHi Leo,
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 #1160302MichaelIs 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 though
February 10, 2020 at 2:39 am #1160305MichaelSorry 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 SupportHi there,
you can use a Hook Element instead of the Header Element – the
before_main_content
hook 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 #1160763MichaelHi 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 #1160768DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.