Add Site Title To Navigation

Add Site Title To Navigation

Our navigation logo option allows you to add logo to the navigation. If you want to display the site title instead, try the PHP snippet below:

add_action( 'after_setup_theme', 'tu_navigation_as_header' );

function tu_navigation_as_header() {

remove_action( 'generate_header', 'generate_construct_header' );

add_action( 'generate_inside_navigation', 'tu_site_title_navigation' );

}

function tu_site_title_navigation() {

?>

<a href="" rel="home">

<?php

}

view raw

gistfile1.txt

hosted with ❤ by GitHub

with the CSS snippet to style it:

.main-navigation .site-branding {
float: left;
}

.main-navigation .site-branding a {
line-height: 60px;
font-size: 20px;
}

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注