Community Forums › Forums › Archived Forums › Design Tips and Tricks › Magazine Pro – Move logo to primary nav
Tagged: Logo, magazine, navbar, primary navigation
- This topic has 10 replies, 4 voices, and was last updated 7 years, 6 months ago by
rasor.
-
AuthorPosts
-
October 11, 2015 at 12:25 am #167846
igecorner
ParticipantHi,
I want to move logo into Primary Navigation Menu, please help to how to do this?
I have followed the steps as per the below link, but no luck
https://amethystwebsitedesign.com/add-logo-on-top-of-navigation-menu-in-a-genesis-child-theme/
Regards
http://igecorner.comOctober 11, 2015 at 3:54 pm #167869Brad Dalton
ParticipantThe tutorial you linked to shows you how to add the logo on top of the navigation, not inside it.
October 11, 2015 at 4:17 pm #167871pluzito
ParticipantLooking for the same with no success 🙁
October 11, 2015 at 4:20 pm #167872Brad Dalton
ParticipantI wrote several tutorials about how to do this however they're for members only.
Not sure you'll find free code for this however you might try searching Google.
October 12, 2015 at 12:49 am #167894igecorner
ParticipantThanks Brad
Could not able to find in google search, can you help if possible ?
October 12, 2015 at 3:51 pm #167962Brad Dalton
ParticipantPlease search the forums or use Google as this question has already been answered. The searching is something you can do yourself.
November 10, 2015 at 7:07 pm #170723pluzito
Participantigecorner could you finally do it? I couldn't 🙁
November 10, 2015 at 11:45 pm #170727igecorner
ParticipantNope, not able to do
November 11, 2015 at 9:22 am #170747rasor
Participanttry adding this to the function.php
//* Logo to Primary Nav add_filter( 'genesis_nav_items', 'ja_logo_to_primary', 10, 2 ); add_filter( 'wp_nav_menu_items', 'ja_logo_to_primary', 10, 2 ); /** * based on Bill Erickson code http://www.billerickson.net/genesis-wordpress-nav-menu-content/ */ function ja_logo_to_primary($menu, $args) { $args = (array)$args; if ( 'primary' !== $args['theme_location'] ) return $menu; $ja_logo = '<li id="ja_logo">Follow: <a href="http://localhost/wpbasics/"><img src="http://localhost/wpbasics/wp-content/uploads/2015/09/WPbasics_header.png" /></li>'; return $ja_logo . $menu; }
and this to the styles.css
#ja_logo { float: left; width: 15%; margin-top: -12px; } #ja_logo a { padding: 0; }
It may not be the best way but it should get the job done. replace the href with your home url and the img src with the location of your logo.
hope it helps
rasor @ WPBasics.org | Buy me a coffee
November 11, 2015 at 9:50 am #170769rasor
ParticipantExtra code added as I am on mobile. Will correct as soon as I get home
rasor @ WPBasics.org | Buy me a coffee
November 11, 2015 at 10:43 am #170775rasor
Participanthere is the code. not sure why the weird characters got added.
//* Logo to Primary Nav add_filter( 'genesis_nav_items', 'ja_logo_to_primary', 10, 2 ); add_filter( 'wp_nav_menu_items', 'ja_logo_to_primary', 10, 2 ); /** * based on Bill Erickson code http://www.billerickson.net/genesis-wordpress-nav-menu-content/ */ function ja_logo_to_primary($menu, $args) { $args = (array)$args; if ( 'primary' !== $args['theme_location'] ) return $menu; $ja_logo = '<li id="ja_logo">Follow: <a href="http://localhost/wpbasics/"><img src="http://localhost/wpbasics/wp-content/uploads/2015/09/WPbasics_header.png" /></li>'; return $ja_logo . $menu; }
rasor @ WPBasics.org | Buy me a coffee
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.