- This topic has 14 replies, 3 voices, and was last updated 5 months ago by
Leo.
-
AuthorPosts
-
September 27, 2020 at 3:10 pm #1461450
Heath
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 #1461455Leo
StaffCustomer 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 π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 27, 2020 at 4:43 pm #1461505Heath
I 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 #1461526Elvin
StaffCustomer SupportHi Heath,
You need to set the display rules. The display rules location will define where the header element will display. π
A wise man once said:
"Have you cleared your cache?"September 27, 2020 at 6:25 pm #1461550Heath
I did that but nothing was showing.
September 27, 2020 at 7:28 pm #1461585Elvin
StaffCustomer 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. π
A wise man once said:
"Have you cleared your cache?"September 27, 2020 at 7:52 pm #1461601Heath
Thanks. This worked. The only other thing is how do I get the text to be centered?
September 27, 2020 at 8:08 pm #1461607Elvin
StaffCustomer 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/wbuP1kRBA wise man once said:
"Have you cleared your cache?"September 28, 2020 at 4:24 am #1462011Heath
I’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 #1462447Leo
StaffCustomer 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/jqcCFKPpJznDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 28, 2020 at 10:29 am #1462644Heath
Maybe its just mobile where I see the issue. It is definitely not centered on my mobile device.
September 28, 2020 at 10:31 am #1462649Heath
And it is the posts that I am referring to.
September 28, 2020 at 10:57 am #1462684Leo
StaffCustomer 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/#paddingDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 28, 2020 at 1:12 pm #1462823Heath
Worked like a charm.
September 28, 2020 at 1:13 pm #1462826Leo
StaffCustomer SupportGlad to hear π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.