Archived topic
Sitetitle in navbar instead of icon?
15 replies · Started by Anders on September 8, 2016
Hi Tom,
Is there a way to get the sitetitel in the navbar instead of the navbar icon?
// Leif
Hi there,
You can use the generate_inside_navigation hook.
Something like this:
add_action( 'generate_inside_navigation','generate_site_title_navigation' );
function generate_site_title_navigation()
{
?>
<div class="menu-site-title">
My site title
</div>
<?php
}
Then style it:
.menu-site-title {
float: left;
font-size: 20px;
color: #FFF;
}
Hope that gets you started :)
Thanks Tom,
This solved it, though I think this should have been feature in the settings under "Sticky Navigation Logo" in layout settings for people like me that does not know php and stuff .. ;-) .. Wink, Wink ..
Anyway thanks again it solved the problem.
Been thinking that recently as well - definitely on my to-do list :)
I'd love to see this added as a feature as well.
I've added the code above according to instructions, using code snippets + simple css, but it doesn't quite work. It's displayed correctly in the sticky-bar, but it's also displayed in the regular header (on initial load) with the ordinary site title and nav menu (which it pushes to the side).
Can it be invisible (on initial load) if another class is used? I'm no developer, so I can't really figure this out myself.
You can add this CSS to it:
.menu-site-title {
display: none;
}
.navigation-stick .menu-site-title {
display: block;
}
Let me know if that helps or not :)
Tom, thanks a lot, it did work! :)
You're welcome :)
Hello
Quick question related
I use text for site title but while i scroll the site title wont appear
Is there a way to make it appear and while in sticky mode of the menu?
thank you
Did you inserted using the method above? https://generatepress.com/forums/topic/sitetitle-in-navbar-instead-of-icon/#post-225010
Hello
Yes actually i use that code but it appears in the header also
i would like to appear only as i scroll down like if i had a small sticky logo?
take a look- its a test url : gegeor.net/https://gegeor.net/gr/
Did you add this CSS? https://generatepress.com/forums/topic/sitetitle-in-navbar-instead-of-icon/#post-283316
Great,worked!
Now it only appears while scrooling:)
How can i place it on the left side?
for styling i guess it needs CSS?
Yup this post provides an example as well: https://generatepress.com/forums/topic/sitetitle-in-navbar-instead-of-icon/#post-225010
many thanks, exactly what i was looking for:))
thank you