Home › Forums › Winning Agent Pro Theme › Add secondary menu to Landing Page
Tagged: conditional page template menu
- This topic has 6 replies, 2 voices, and was last updated 7 years, 7 months ago by
Nathan Garrett.
- AuthorPosts
- November 6, 2014 at 10:10 pm #3859
Nathan Garrett
ParticipantI was wondering if there was a way to add a Secondary Menu to just the Landing Page. I would like it to be just below the backstretch image (before content) Any help would be greatly appreciated.
Thank You!
- November 8, 2014 at 6:03 pm #3899
Ginger Coolidge
ParticipantHi Nathan,
Did you mean primary navigation menu by chance? The secondary navigation menu in the theme is used for Communities and shows just below the Footer 1 and 2 widgets in the demo. I’ll continue assuming primary nav and you can let me know if it was the other.
You can accomplish this by following the steps on this this forum post:
https://www.winningagent.com/forums/topic/remove-primary-nav-homepage-keep-pages/
The difference is use this for your conditional statement:
// only display if we are on a landing page template if ( is_page_template( 'page_landing.php' ) ) { genesis_do_nav(); }
That is saying to only show the primary nav if you’re on a page using the landing page template. I got this info from this page in the WordPress.org Codex that I frequent a lot:
http://codex.wordpress.org/Conditional_Tags
Scroll down to the heading Is a Page Template
There are other conditionals you can use if you want to show the menu on only one specific landing page.
Hope this helps!
-Ginger
- November 8, 2014 at 7:47 pm #3901
Nathan Garrett
ParticipantThanks for your quick response Ginger! I was actually wanting to keep the primary menu on every page but wanted to add a separate (second) menu just below the fold on the landing page.
Any ideas?
- November 9, 2014 at 10:50 am #3902
Ginger Coolidge
ParticipantHi Nathan,
The Winning Agent Pro theme doesn’t use the Primary Navigation menu position so this menu can be used elsewhere if you like. The menu on your site (HOME – FIND A HOME – ABOUT – CONTACT US – BLOG) is using a custom menu widget per the theme setup.
Have you created a sample page using the landing page template? If not I recommend it so you can get a visual. If you enable that Primary Navigation menu position in your Dashboard => Appearance => Menus => Primary Navigation Menu => Assigned Menu, then make the code change above in your functions.php file, you’ll see this shows up at the top of a landing page with the content area below it. If you’d like a menu to show below the content, this can be done using the footer menu in the theme.
Here is a screen shot of how the standard landing page template looks with a menu assigned to the primary navigation space:
Best Regards,
Ginger
- November 13, 2014 at 7:34 pm #3937
Nathan Garrett
ParticipantThank you again for your help Ginger. I apologize for any confusion, I actually meant “front page”
I experimented with the primary navigation menu and I believe using that will do the trick! I just need help with the correct coding, this way it will only show on “front page” below search widget (or above content)
Is this possible? Again thank you so much for your help!
- November 14, 2014 at 7:02 pm #3938
Ginger Coolidge
ParticipantHi Nathan,
OK, then that original link from the other forum post will work:
All you need to do is remove the exclamation point where it has
( ! is_front_page() )
change it to
( Is front_page() )
and that will only show the primary navigation menu position on the front page of your site.
Best Regards,
-Ginger
- November 16, 2014 at 7:25 pm #3967
Nathan Garrett
ParticipantI must be missing something, didn’t work for me…
This is where I’m at right now
https://www.dropbox.com/s/yob1lsuf3q063h8/MenuWEBSITE.PNG?dl=0
I’m wanting it (centered) below the home search widget and display only on front page.
So close… Grrr!!
- AuthorPosts
- You must be logged in to reply to this topic.