• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Moving logo into main navigation (magazine pro theme)

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Moving logo into main navigation (magazine pro theme)

This topic is: not resolved

Tagged: Magazine Pro, nav menu

  • This topic has 10 replies, 3 voices, and was last updated 9 years, 5 months ago by Brad Dalton.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • November 7, 2016 at 2:29 pm #195848
    Saqib Ali
    Member

    As the title suggests I'd like to move the logo into .nav-primary http://britishhomeopathic.co.uk/

    I'd also like to move the search bar into the .nav-primary area.

    And now there's a blank space I'd like to get rid of this also if possible.

    How would I go about doing this?

    I'm assuming php right?

    http://britishhomeopathic.co.uk
    November 7, 2016 at 6:57 pm #195874
    ᴅᴀᴠɪᴅ
    Member

    Yes php.

    But what you'd be better doing is moving the primary nav into the header, in between the header and the search. Then making the whole header sticky.

    There is documentation on how to move the primary nav;
    http://my.studiopress.com/snippets/navigation-menus/#reposition-primary but you'd need to use the hook genesis_header instead of genesis_before_header as they use in the example.

    Then make the whole header sticky, there are numerous tutorials about that show how to do this. here's one https://ozzyrodriguez.com/tutorials/fixed-header-wordpress/


    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

    November 7, 2016 at 7:30 pm #195876
    Brad Dalton
    Participant

    Use this code to add something to any nav menu


    Tutorials for StudioPress Themes.

    November 15, 2016 at 4:12 pm #196209
    Saqib Ali
    Member

    Thanks guys I was able to get it working with the snippets.

    I'm still trying to add the logo to the top left but for some reason, it's not working, I must be not using the hook correctly.

    November 16, 2016 at 12:57 pm #196255
    Saqib Ali
    Member

    And also the slider now is getting eaten up by the nav-primary.

    November 30, 2016 at 9:57 am #196824
    Saqib Ali
    Member

    Was I supposed to do this?

    //* Reposition the primary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav' );
    November 30, 2016 at 10:18 am #196826
    Brad Dalton
    Participant

    To add your logo to the nav menu, please use the code i linked to above.


    Tutorials for StudioPress Themes.

    November 30, 2016 at 4:44 pm #196837
    Saqib Ali
    Member

    Thanks, appreciate you highlighting the same link @braddalton.

    I tried the first approach but I was going around in circles.

    I've copied and pasted the code from the link into my functions.php file but I only see options for being to add:

    - Changing primary to secondary / vice versa
    - Search
    - Time and Date

    How would I go about adding the logo into the top left or as the first item?

    add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
    /**
     * Filter menu items, appending either a search form or today's date.
     *
     * @param string   $menu HTML string of list items.
     * @param stdClass $args Menu arguments.
     *
     * @return string Amended HTML string of list items.
     */
    function theme_menu_extras( $menu, $args ) {
    	//* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
    	if ( 'primary' !== $args->theme_location )
    		return $menu;
    	//* Uncomment this block to add a search form to the navigation menu
    	/*
    	ob_start();
    	get_search_form();
    	$search = ob_get_clean();
    	$menu  .= '<li class="right search">' . $search . '</li>';
    	*/
    	//* Uncomment this block to add the date to the navigation menu
    	/*
    	$menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '</li>';
    	*/
    	return $menu;
    }
    December 1, 2016 at 6:53 am #196849
    Brad Dalton
    Participant

    Create a variable equal to your image

    $image = 'http://example.com/image';
    

    Then swap out the code for the date with the variable for your $image.


    Tutorials for StudioPress Themes.

    December 2, 2016 at 3:25 am #196901
    Saqib Ali
    Member

    Cheers @braddalton really appreciate the help and good job with the video.

    December 2, 2016 at 4:47 am #196908
    Brad Dalton
    Participant

    You could also use esc_url( $url ) to sanitize your URL like this:

    $image = esc_url('http://example.com');
    

    Or

    Pull the image from your child theme's images folder using get_stylesheet_directory_uri()

    $image = sprintf( '%s/images/logo.jpg', get_stylesheet_directory_uri()  );
    

    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble