Archived topic
Use both navigation logo and site title in menu.
3 replies · Started by Chris on February 28, 2017
I would like to use a navigation logo in the main menu, but I also want the site title to appear there. Like this:
My Website
Screenshot
Right now I have done this by adding jQuery to header.php in my child theme:
<?php $site_title = get_bloginfo( 'name' );?>
<script>
jQuery(function() {
jQuery('#site-navigation > div > div.site-logo.sticky-logo.navigation-logo > a > img').after('<span class="site-nav-title"><?php echo $site_title; ?></span>');
});
</script>
I don't really like this method though, and I would prefer to modify the PHP/HTML if possible. I'm not sure which file to change or what to do. How would you suggest I do this? Or is there perhaps a built-in GeneratePress way to do this that I didn't notice?
Hi Chris,
I think you can try the inside navigation hook:
https://docs.generatepress.com/article/generate_inside_navigation/
Or maybe add the site title to the logo and upload image as one image? Just another thought..
Let me know if this helps.
Perfect, this is what I was looking for.
Thank you!
You're welcome :)