Last active
June 12, 2018 21:00
-
-
Save generatepress/e41f0e0d083b4c2350ac772eb69479f1 to your computer and use it in GitHub Desktop.
Add site title to the navigation. See https://gist.github.com/generatepress/9f99bbfa532ea4f9eafb6bd238b8cc9a for necessary CSS.
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_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() { | |
?> | |
<div class="site-branding"> | |
<p class="main-title" itemprop="headline"> | |
<a href="<?php echo site_url(); ?>" rel="home"> | |
<?php bloginfo( 'name' ); ?> | |
</a> | |
</p> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment