• 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

How to add social icons to secondary nav menu

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 › How to add social icons to secondary nav menu

This topic is: not resolved

Tagged: metro nav menu social icons search box

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 5 months ago by Sergiu.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 12, 2015 at 12:09 pm #155993
    Sergiu
    Member

    Hi all, I've recently bought the genesis framework and I'm currently working on the metro theme.

    I've found online this guide: http://www.petersenmediagroup.com/genesis-framework/adding-simple-social-icons-search-form-genesis-menu/ and I followed the 2nd approach. The problem is, I'm not sure how can I move the social icons to the secondary nav menu. and align them to the right?
    And while we're at it, is there a way to align the 2nd menu items to the left?( Basically I'd like to list my pages on the right and show my social icons on the left of the secondary nav menu.see img

    Thanks!

    June 13, 2015 at 4:15 am #156076
    Sergiu
    Member

    edit, I've currently added this code to my functions which does almost what I need. I just have to get the search box somehow on primary nav menu and align the social icons on the right of second nav menu while having the other items on that menu aligned to the left.

    // Add Social Widget Area for Primay Nav
    genesis_register_sidebar( array(
    'id' => 'nav-social-menu',
    'name' => __( 'Nav Social Menu' ),
    'description' => __( 'This is the nav social menu section.' ),
    ) );

    // Add Search to Primary Nav
    add_filter( 'wp_nav_menu_items', 'genesis_search_primary_nav_menu', 10, 2 );
    function genesis_search_primary_nav_menu( $menu, stdClass $args ){
    if ( 'secondary' != $args->theme_location )
    return $menu;

    if( genesis_get_option( 'nav_extras' ) )
    return $menu;

    ob_start();
    echo '<li id="menu-item-4439203" class="custom-social menu-item">';
    genesis_widget_area('nav-social-menu');
    $social = ob_get_clean();

    $menu_search = sprintf( '%s', __( genesis_search_form( $echo ) ) );

    return $menu . $social . $menu_search;
    }

    June 13, 2015 at 12:43 pm #156116
    Brad Dalton
    Participant

    Modify this line:

    if ( 'secondary' != $args->theme_location )

    http://www.studiopress.community/faq/#code


    Tutorials for StudioPress Themes.

    June 13, 2015 at 4:19 pm #156131
    Sergiu
    Member

    If I modify that line it'll move both the search box and the social icons to the main nav

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 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

© 2025 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