A user in Genesis Slack chat asks,
do you know of a “trick” to move the site logo from the header area to the main nav? Driving me bonkers.
Yes. The trick is called output buffering.
In this article I share the steps for relocating Site Title and Site Description from their default location in Cafe Pro to the left of Primary Navigation menu items. When scrolling down, we shall show only the small site title in the fixed nav as before.
Step 1
In Cafe Pro's functions.php replace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Add Site Title to Primary Nav | |
add_filter( 'genesis_nav_items', 'cafe_nav_site_title', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'cafe_nav_site_title', 10, 2 ); | |
function cafe_nav_site_title($menu, $args) { | |
$args = (array)$args; | |
if ( 'primary' !== $args['theme_location'] ) | |
return $menu; | |
$output = sprintf( '<li class="small-site-title"><a href="%s">%s</a></li>', trailingslashit( home_url() ), get_bloginfo( 'name' ) ); | |
return $output . $menu; | |
} |
with
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
I have a problem with the logo. It still shows up on top of the background picture on the Homepage here: http://dn.lindebjerg.de/ ?
I have now checked, and double checked;-) … but still?
Because the inner pages now have a logo in the Navigation: http://dn.lindebjerg.de/beispiel-seite/
How can I turn off the site-header on all inner pages, posts, archives … all content ?
and to make the Navigation just perfect, I would like to make a smaller Logo version on the left, instead of the black and white html version now.
or should I rater request a new Tutorial?
Best Regards,
Jesper
I forgot to add this bit in my tutorial earlier.
Add this in functions.php to remove the site title from its default location: http://pastebin.com/raw/uTCJX7La
I’ve updated the tutorial accordingly.
Is it possible to get it to display in the primary and secondary navigation at the same time? How would I need to modify the code to do that?
The header still appears in the top area, as well as in the navigation menu now?
http://howsweetdesigns-staging.com/
Hi,
Please see https://sridharkatakam.com/how-to-move-title-area-from-header-to-primary-nav-in-cafe-pro/#comment-415701.