Site logo

Archived topic

Hero element ABOVE main navigation menu

16 replies · Started by Vera on March 31, 2020

Viewing posts 1–15 of 17

Hello,

I have tried for several hours but have not been able to figure out how to do this:

I have a horizontal main navigation menu and a horizontal secondary navigation menu on all my pages. The secondary menu is at the very top of each page.

On my home (front) page only, I want to set up a hero element with a 300-400px high image below the secondary menu and then my main menu below the hero element. I want the same layout on all my other pages except I want to substitute a different 75-100px high art banner for the hero element.

I can set up the elements but can’t get them to appear between the two menus. Is there a way to do this while having a different treatment on the home page than the other pages?

I would appreciate any help. Thank you!

Thank you for the quick reply. I tried creating and activating a “code snippet” using the plugin but it had no effect.

Can you tell me where to place the code or snippet? Would it be inside the html box on the hero element (setting) page? I’m reluctant to just experiment and possibly break my site. (I am not a coder.)

Also, I would like the same effect for all my other pages but with different images. I noticed the php code mentions “front page” which suggests it will only work for that.

Thanks again!

I get this error when trying to activate the snippet:

The snippet has been deactivated due to an error on line 3:

Cannot redeclare function craig_move_navigation.

Also, neither php snippet changes the position of the menu to below the hero.

It works now — thank you! I did have the menu set to appear below the header. I just had to deactivate the front page snippet and activate the other one. But I still need a different hero on my home page, and with the main menu below it.

I may also eventually want different banner art on different pages of my site. If I set up separate elements with display rules for each banner, will this code snippet still work?

Creating separate header elements and setting display options for specific pages does not allow me to use different headers for different sections (groups of pages).

Hi there,

couple of things:

1. For your Home Page select the Front Page Location in your Display Rules.

2. Beware of conflicts. For Example: If you first create a Header Element that is set to Pages > All Pages this will override a second Header set to Pages > Specific page. For this to work you would Exclude the Specific Page from your first header element

Thank you for your reply.

I attached images showing the settings for the only headers I currently have set up and the code snippet Leo directed me to for making my main navigation menu display below the banner art — in case that’s having any effect.

My header elements appear to be set up correctly, but the only one that displays the banner art is #2.

The links below are the pages I defined for banner art in their header elements and they are currently the only elements in my site. The numbers reference the red numbers on the image.

1: http://www.marshallart.com/HOME/
2: http://www.marshallart.com/HOME/seminars/human-anatomy/
3: http://www.marshallart.com/HOME/seminars/animal-anatomy/

Header element settings

Snippet code

Can you take a screenshot of the page hero settings for #1 the home page one?

If you mean the box right above where my screenshot starts, no, there is nothing in that box. I will probably only have an image for now, but one day I would like to put a slideshow there. BTW: Can GeneratePress accommodate that?

This archived topic is closed to new replies.