• 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

framework 2.1.2 – primary navigation extras – date gone –

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 › framework 2.1.2 – primary navigation extras – date gone –

This topic is: not resolved
  • This topic has 3 replies, 4 voices, and was last updated 11 years, 8 months ago by kzoll.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 21, 2014 at 2:39 pm #115250
    bryantrucking
    Member

    The new version deleted my date from the primary navigation extras in the GENESIS>THEME SETTTINGS.

    For whatever reason, when it updated it took out the primary navigation extras.

    Can someone provide a code to get it back? -it is actually useful for my site.

    Regards.

    July 21, 2014 at 10:04 pm #115310
    Lauren Gaige
    Member

    Sure thing! You can add the code below to your functions.php to get your date back!

    add_filter( 'wp_nav_menu_items', 'prefix_primary_nav_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 prefix_primary_nav_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 the date to the navigation menu
    /*
    $menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';
    */

    return $menu;
    }

    Just be sure to take a backup before doing so just in case something goes crazy!


    Lauren
    http://www.restored316designs.com

    July 21, 2014 at 10:17 pm #115313
    DTHkelly
    Member

    Lauren's correct, but the code has curved ' instead of 'so here's the github link to the same code.

    Add Nav Extras

    July 28, 2014 at 10:21 am #116101
    kzoll
    Participant

    I added the Nax Extras code (minus the comments, per the instructions on Snippets page) but the Select Search/Date dropdown doesn't appear under Genesis > Theme Settings. I'm working in Education Pro theme right now.

    http://themasslodge.com/beta

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