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 hidden or 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.