Home › Forums › Calendar Products › Events Calendar PRO › Add Navigation to Event Calendar Pro template (Genesis theme)
- This topic has 7 replies, 2 voices, and was last updated 11 years, 8 months ago by
Brian.
-
AuthorPosts
-
August 25, 2014 at 6:04 am #698407
Timothy Walker
ParticipantHow do I add the nav menu to the ECP templates using the Genesis theme? Once a user goes to the calendar there appears to be no way to get back to any of the other pages on the website.
August 25, 2014 at 11:48 am #699055Brian
MemberHello,
Sorry for the trouble I can help you out here.
I use Genesis and have some familiarity with integrating it, but have not run into this issue before.
I took a look at you site and see the menu not showing on that page.
I also visited a page where it is showing. I see it is inside the inner div, which i do not believe is the standard place for it. Do you have any coding in your theme’s function to move the menu with an action?
Can you let me know about that and can you please change themes to the base Genesis theme and see if the menu shows on that page? (you may have to resave the menu when you change themes).
Let me know what you fin out and we can go from there.
Thanks
August 25, 2014 at 12:12 pm #699100Timothy Walker
ParticipantHi Brian, and thanks for the help!
If I switch to the parent Geneisis theme the menu does show up. The child theme they are using is “Education” (http://my.studiopress.com/themes/education/) and I did find this in the functions.php file:
/** Reposition Primary Navigation */
remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
add_action( ‘genesis_before_content_sidebar_wrap’, ‘genesis_do_nav’ );/** Reposition Secondary Navigation */
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_before_content_sidebar_wrap’, ‘genesis_do_subnav’ );August 25, 2014 at 1:02 pm #699189Brian
MemberI think the best thing to do is keep that coding in there and that add a conditional statement for the Events Calendar Pages to add the menu on it’s pages.
Here is the basic code I came up with, but you may have to play around with the hooks to get it right. It may change some of the styling which you might have to make some changes to for it to work.
add_action( 'wp_head', 'event_move_nav_genesis' );
function event_move_nav_genesis() {
if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) {
//Reposition main nav
add_action( 'genesis_after_header', 'genesis_do_nav' , 10 );
//Reposition secondary nav
add_action( 'genesis_after_header', 'genesis_do_subnav' , 10 );
}
}Let me know if that helps.
Thanks
August 25, 2014 at 1:39 pm #699291Timothy Walker
ParticipantThank you! I was wondering what to look for to see if it was a calendar page!
We are a LOT closer, but I think it’s off by a “<div class=”wrap”>”. Here’s how a normal page starts off…
<div class=”wrap”>
<div id=”nav”>
<div class=”wrap”>
<ul id=”menu-main-menu” class=”menu genesis-nav-menu menu-primary”>
<li id=…In the calendar, it’s missing the first div…
<div id=”nav”>
<div class=”wrap”>
<ul id=”menu-main-menu” class=”menu genesis-nav-menu menu-primary”>
<li…It looks like the extra div may be after the navigation and before the tribal code…
</div> <!– closing nav div –>
<div id=”inner”>
<div class=”wrap”>
<div id=”tribe-events-pg-template”>Thanks!
August 25, 2014 at 1:55 pm #699320Brian
MemberAll those divs are created by the functions in Genesis. The coding I provided is for moving the nav on the Events Calendar pages out of the inner nav, which is causing the problem. So I think if you play around with the Genesis Hooks you will be able to place the nav in the correct place.
Here is a link to the hooks in genesis.
http://my.studiopress.com/docs/hook-reference/
Please try playing around with placing the nav using the hooks.
Thanks
August 25, 2014 at 2:26 pm #699374Timothy Walker
ParticipantWill do.
Thanks for all of your help Brian! I can figure the rest out from here.
August 26, 2014 at 11:31 am #701916Brian
MemberGreat, glad it helps, I am going to go ahead and close this ticket, but if you need any other on something else please post a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Add Navigation to Event Calendar Pro template (Genesis theme)’ is closed to new replies.
