Archived topic
different images in the header for each page of the site
7 replies · Started by Factory Prime on January 28, 2021
Hello
I would like to have different images in the header for each page of the site, I tried to set them in elements the new header and I made a rule to see it in the page below but it is inserted under the menu and with the default header of the site
Example:
https://newyorkmurales.com/east-side/
How can I do?
Also if in the options I put: mobile header on the site header in mobile disappears, if I put off the header in mobile appears.
!?!?
Hi there,
the Header Element was designed for adding page heros that display below the site header/navigation. However, what we can do is:
1. Use a Layout Element to Disable the Site Header.
2. Add this PHP Snippet to move the Primary navigation and the Mobile Header below your Header Element:
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
remove_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 5 );
add_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 15 );
}
This will replace your site header with your header element.
Hi, David
Thanks a lot!!
Now it works but the breadcrumbs are now above the menu, I wanted them under the menu.
How can I do?
I for the bc had entered
add_action ('generate_after_header', function () {
if (function_exists ('yoast_breadcrumb')) {
yoast_breadcrumb ('
');
}
});
Solved:
add_action( 'generate_after_navigation', function() {
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '
' );
}
} );
Looks great ! Glad to be of help.
Thanks a lot!!
You're welcome - nice site :)