Reply To: Different headers with menu under picture

Home Forums Support Different headers with menu under picture Reply To: Different headers with menu under picture

Home Forums Support Different headers with menu under picture Reply To: Different headers with menu under picture

#246161
Tom
Lead Developer
Lead Developer

Your code would be:

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', 'generate_add_navigation_after_header', 5 );
		add_action( 'generate_after_page_header', 'generate_add_navigation_after_header', 5 );
	}
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

It will detect if something is in your Page Header meta box and only apply then.

If you need to apply it to specific pages, you would need to use conditionals: https://codex.wordpress.org/Conditional_Tags