- This topic has 12 replies, 4 voices, and was last updated 3 years, 10 months ago by David.
-
AuthorPosts
-
May 28, 2020 at 12:52 pm #1305515Alex
Hi,
I’m trying to create a static landing page with Generatepress 2.4.2/1.10.0
Followed the instructions on https://docs.generatepress.com/article/page-hero-examples/ and nothing.
I’ve tried with background color only and with a custom imageMay 28, 2020 at 8:25 pm #1305794TomLead DeveloperLead DeveloperHi there,
What do you mean by static landing page? Do you have any examples?
May 29, 2020 at 12:30 am #1305955AlexHi Tom,
Thank you for the reply.
By static I mean just an image or just background color with a button. No menus, no navigation…
Like a page hero but full page.I hope I’ve managed to explain.
May 29, 2020 at 3:14 am #1306092DavidStaffCustomer SupportHi there,
you can use the Layout Element to remove all of the elements you don’t require:
https://docs.generatepress.com/article/layout-element-overview/
then create a new Header Element.
Within you can add your Button HTML eg.<a class="button" href="url">My button</a>
Set the Background Image.
Then on the Header Elements > Site Header Tab select Merge with Content.
Then back on the Hero tab you can select the full height option to fill the page.May 29, 2020 at 10:15 am #1306756AlexThanks David,
That’s what I’ve done but neither background or custom image are showing.
1. Layout
– All elements except header have been disabled.
– Display rule -specific page.2. Header
Page Hero
– My button inserted for the button
– Full Screen
– background color selectedSite header
– MergeDisplay rule
-specific page.Nothing. Did it 3 more times and nothing. Just a blank page.
May 29, 2020 at 3:55 pm #1307055AlexThere seems to be a conflict of some kind but I am not sure where and Elements does not work as expected.
It is disappointing and I give up after testing only this for one full day.
May 29, 2020 at 4:37 pm #1307085TomLead DeveloperLead DeveloperHi there,
The URL you shared in your original post doesn’t seem to have any page hero content/settings.
Do you maybe have more than one Header Element? If so, try deactivating all of them except for the new one you’ve created. Does it show?
May 29, 2020 at 10:48 pm #1307256AnisHi Tom, Alex and David.
I also had the same problem. As Tom suggested, I deactivated the other headers, and the new one showed up on the specific page. When I reactivated the other headers, the problem again showed up.
Then, as a try, I changed the published date of the new header to a date before those of the other headers, and voila! it showed up on the specific page as I wanted.
It seems to be a ‘hierarchy’ or ‘priority’ problem based on the date of publishing of the header.
In my case, there was a site default header for the entire site. Since that was published before, it had precedence over the new one created for a specific page. When I changed the published date of the new one to a date before that of the site default header, the new one was displayed on the specific page, and all other pages had the default one.
Tom, perhaps adding a new ‘priority’ value to the header properties might solve the issue. Like the way z-index works… For a specific page or post or front page or entire site, etc., a header with a higher priority number will be displayed.
Best,
Anis
May 30, 2020 at 3:22 am #1307419AlexHi Anis,
Thank you for the input.
In my case it was another header element as Tom suggested.
A header hook with adsense verification code. Since it had nothing to do with the layout, I didn’t even think it would have any effect. It’s been disabled and we have the full page header as needed.Thank you all for the help.
May 30, 2020 at 6:08 am #1307526DavidStaffCustomer SupportAlex – glad to hear you got it resolved.
Anis – thanks for the assist.The conditional code behind Display Rules is super complicated and we have yet to find an easy solution for ‘prioritising’ or setting ‘local vs global scope’ rules to avoid conflicts.
Header Elements are the only Element that suffers from Display Rule conflicts – as there can only be one Header element on any post / page / archive.
So when creating multiple header elements we need to be mindful of rules that conflict. For example:
Header Element #1 (published first)
Display location: Entire SiteHeader Element #2
Display location: Posts > All Posts.In this instance we have a conflict as Entire Site includes All Posts.
When this occurs GP will select the Oldest Element ie. the one with the oldest published date.
So in this instance Header #1 is displayed everywhere including All Posts.One way to avoid this is to use the Exclude Location eg.
Header Element #1 (published first)
Display location: Entire Site
Exclude location: Posts > All PostsBy excluding All Posts from Header #1, we see that Header #2 is now displayed.
Best thing in my opinion when you require multiple header elements is to avoid Global locations such as Entire Site. This will minimize the need for a long list of Exclude rules or chances of Conflicts.
May 30, 2020 at 6:39 am #1307551AnisThanks for the updates, Alex and David. ๐
I might try the exclude rule in the future to see if it is effective.
May 30, 2020 at 6:45 am #1307560AnisWell, I just tried the exclude rule, and it worked perfectly! ๐
Thanks, David for the explanation and help.
May 30, 2020 at 7:06 am #1307583DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.