- This topic has 14 replies, 3 voices, and was last updated 3 years, 6 months ago by Leo.
-
AuthorPosts
-
September 27, 2020 at 3:10 pm #1461450Heath
I would like my Header element to show on the home page and at the top of my blog posts if possible. I still would like to show the featured image of the post as well. Is this possible?
September 27, 2020 at 3:15 pm #1461455LeoStaffCustomer SupportHi there,
The best practice I would recommend is to create 2 separate header elements for the posts page and single posts:
– Posts page: A header element with a custom image as the background image option as WordPress doesn’t allow a featured image on posts/archives pages.
– Single posts: A header with featured images as the background image option so the background image would be dynamic.
https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-2-choose-a-background
Let me know if this helps π
September 27, 2020 at 4:43 pm #1461505HeathI know youve included the link but I’m not able to get this to actually show in the posts.
September 27, 2020 at 5:26 pm #1461526ElvinStaffCustomer SupportHi Heath,
You need to set the display rules. The display rules location will define where the header element will display. π
September 27, 2020 at 6:25 pm #1461550HeathI did that but nothing was showing.
September 27, 2020 at 7:28 pm #1461585ElvinStaffCustomer SupportI’ve inspected the site and it’s actually there but it isn’t visible because the element height was 0.
We’re close. We just to make it visible by adding padding top or bottom on the Header element.
Here’s a demo video you can copy to make it appear. π
https://share.getcloudapp.com/yAul8LQ0Adding {{post.title}} is optional. I just added it to show more possibilities with the element. π
September 27, 2020 at 7:52 pm #1461601HeathThanks. This worked. The only other thing is how do I get the text to be centered?
September 27, 2020 at 8:08 pm #1461607ElvinStaffCustomer SupportNice one!
The only other thing is how do I get the text to be centered?
One the same tab where you set the padding, you should be able to see a “Horizontal Alignment” option. Just set it to “Center”.
https://share.getcloudapp.com/wbuP1kRBSeptember 28, 2020 at 4:24 am #1462011HeathI’ve done that as well but the text still isn’t centered. Its to the left of the screen.
September 28, 2020 at 8:28 am #1462447LeoStaffCustomer SupportIs there a specific page or post I should be looking at?
The home page is centered:
https://www.screencast.com/t/TX5MA3FOSo are the single posts:
https://www.screencast.com/t/jqcCFKPpJznSeptember 28, 2020 at 10:29 am #1462644HeathMaybe its just mobile where I see the issue. It is definitely not centered on my mobile device.
September 28, 2020 at 10:31 am #1462649HeathAnd it is the posts that I am referring to.
September 28, 2020 at 10:57 am #1462684LeoStaffCustomer SupportYou have uneven left and right padding set on mobile:
https://www.screencast.com/t/jqYyFt59TE4EYou can adjust the setting with the mobile toggle activated:
https://docs.generatepress.com/article/header-element-overview/#paddingSeptember 28, 2020 at 1:12 pm #1462823HeathWorked like a charm.
September 28, 2020 at 1:13 pm #1462826LeoStaffCustomer SupportGlad to hear π
-
AuthorPosts
- You must be logged in to reply to this topic.