- This topic has 22 replies, 6 voices, and was last updated 8 years, 3 months ago by
Tom.
-
AuthorPosts
-
January 30, 2015 at 2:03 pm #70613
Matt Canning
Is it possible to upload a logo in to the nav bar. Perhaps before the first page or even after the last page with an option to align?
January 31, 2015 at 8:50 am #70792Tom
Lead DeveloperLead DeveloperIt would involve some custom PHP code in order to do that – I’m away from the office so I can’t provide it – but if you’d like it I can provide once I get home on Monday.
You can also try setting the Navigation Position in “Customize > Layout” to float right.
Then you can remove the navigation background from the navigation and set up your header element with the same color.
That will achieve the same sort of look.
Let me know π
January 31, 2015 at 10:51 am #70854Matt Canning
I would be forever in your debt π It would be fantastic if you could π
I have also tried adding some custom CSS to try and get the space between the header and main content to 0 but I doesn’t seem to be working π
January 31, 2015 at 9:47 pm #70962Dev
I am interested in the same thing as well (ability to do logo in nav bar with align option and suppress rest of the header altogether). I am considering switching from a theme I purchased on themeforest because of your superior code quality and would gladly purchase every add on once I overcome some of these concerns.
February 2, 2015 at 10:28 am #71358Tom
Lead DeveloperLead DeveloperOk, here’s how we do this π
First, we’ll add our custom CSS:
.main-navigation .site-logo { float: left; line-height: 60px; /* Adjust this to your menu item height */ margin-right: 1.5em; }
Now, let’s add our PHP – we can use this plugin to add the code: https://wordpress.org/plugins/code-snippets/
add_action('generate_inside_navigation','generate_navigation_logo'); function generate_navigation_logo() { ?> <div class="site-logo"> <img src="THE URL TO YOUR IMAGE" alt="" /> </div> <?php }
A couple small adjustments may be needed – but that should be the bulk of it π
February 2, 2015 at 11:46 am #71407Matt Canning
Good news. The code works.
Bad news. I cannot get the nav bar to be 100% width and even though the colour code is the same it looks different :/
February 2, 2015 at 12:22 pm #71412Matt Canning
I’ve sorted it. Played around with the dimensions. Looks great!
There is a gap between the header and main content which is slightly too big. Is there a way to reduce this?
February 2, 2015 at 12:52 pm #71423Tom
Lead DeveloperLead DeveloperDo you have a link to your site so I can take a look?
February 4, 2015 at 5:02 am #72021Matt Canning
February 4, 2015 at 10:12 am #72239Tom
Lead DeveloperLead DeveloperNice site!
It looks like you already reduced the content top padding? You can reduce it more to make the gap smaller.
Let me know π
March 3, 2015 at 8:45 am #82203Jessica
De Snippet plugin does not save my code. Whatever I do, nothing works to save the second code, de php. Any tips for this?
March 3, 2015 at 10:17 am #82221Tom
Lead DeveloperLead DeveloperHave you tried contacting their support?
Another option is to create a plugin with your PHP using this plugin (yes, a plugin to create a plugin): https://wordpress.org/plugins/pluginception/
March 18, 2015 at 8:02 am #88211Jessica
The code does not work with the new generate press update. I get a white screen, it doenst show my website at all anymore.
March 18, 2015 at 8:06 am #88212Jessica
Sorry my mistake, i did something wrong π I works now
March 18, 2015 at 9:17 am #88234Tom
Lead DeveloperLead DeveloperCool π
-
AuthorPosts
- You must be logged in to reply to this topic.