• 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

Primary navigation extra's

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 › General Discussion › Primary navigation extra's

This topic is: resolved

Tagged: Google custom search engine, nav extra

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 2 months ago by Gary Jones.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 3, 2013 at 9:31 am #23897
    iaditya999
    Member

    I am using eleven40 theme. I have primary navigation active on my blog. In genesis theme option there are some options about adding extra's on right hand side of the sidebar. where it is possible to add date or twitter button.

    Actually I want to add google custom search engine in the area of extra's of primary sidebar ! How do I ???

    March 4, 2013 at 5:11 pm #24163
    Gary Jones
    Member

    Here's how you add a nav extra of a date - you can amend the date stuff with whatever the code is for google custom search engine:
    add_filter( 'wp_nav_menu_items', 'gmj_add_date_menu_item', 10, 2 );
    /**
    * Add date menu item to end of existing menu items.
    *
    * @author Gary Jones
    *
    * @param string $items Menu items already converted to a string of markup.
    * @args stdClass $args Menu arguments.
    *
    * @return string Amended markup.
    */
    function gmj_add_date_menu_item( $items, stdClass $args ) {
    // Limit to a certain menu location
    if ( 'primary' != $args->theme_location ) {
    return $items;
    }
    // Straight concatenation here. Could prepend, or do a regex replace to
    // insert the menu item elsewhere
    $items .= '' . date_i18n( get_option( 'date_format' ) ) . '';

    return $items;
    }


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ 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