Site logo

Archived topic

Duplicate Menu

3 replies · Started by Andy on December 5, 2016

Viewing posts 1–4 of 4

Hi Tom,

I'm using some code you had posted on the forums (slightly edited) to make the navigation display below the page header:

add_action( 'wp','tu_move_nav_inside_page_header' );
function tu_move_nav_inside_page_header()
{
	$page_header_content = get_post_meta( get_the_ID(), '_meta-generate-page-header-content', true );
	if ( '' !== $page_header_content ) {
		remove_action( 'generate_after_header_content', 'generate_add_navigation_after_header', 5 );
		add_action( 'generate_after_page_header', 'generate_add_navigation_after_header', 5 );
	}
}

It works but it also leaves a copy of the navigation in its original position. I could try hiding this with CSS but is there a better way using the action hook you provided?

You can see the site here: http://tinyurl.com/h7943yu

Sorry I realised I while ago what the code should have been and then forgot to change it in the functions file.

Thanks Tom.

No problem :)

This archived topic is closed to new replies.