• 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

Insert slider or graphic above secondary nav

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 › Insert slider or graphic above secondary nav

This topic is: not resolved

Tagged: secondary nav

  • This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by GoalSetter40s.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • August 2, 2015 at 11:25 am #161172
    GoalSetter40s
    Participant

    I have a primary and secondary nav. I'm using Genesis Simple Menus for page specific secondary nav. I would like to insert a slider or graphic (or perhaps the ability to use a shortcode, for a slider) above the secondary nav.

    What's the best way to do this?

    http://scbeach.com/caribbean-resort/interior-photos-phase-i/
    August 3, 2015 at 2:25 am #161216
    Brad Dalton
    Participant

    If your slider includes a function call, you can hook the function call in using any hook.

    If your slider includes a short code, you can hook the short code in or hook in a new widget area and add the short code to the widget.


    Tutorials for StudioPress Themes.

    August 3, 2015 at 9:17 am #161269
    GoalSetter40s
    Participant

    Your diagram on all the various genesis hooks is awesome. I started to make my own a few times, but never finished. I'll be using yours a a reference from now on. Thank you so much!

    Perhaps you answered my question, but unfortunately I don't fully understand how to implement it. I probably didn't explain my goal well, so I'll try again.

    Simply put, I want to insert some HTML code or a shortcode to "piggy back" along with the logic in the [Genesis Simple Menus] that places the page specific secondary nav. For example:

    1.) For secondary nav menu01, I want image01 (or shortcode01) above that secondary nav.
    2.) For secondary nav menu02, I want image02 (or shortcode02) above that secondary nav
    etc.

    Your help is greatly appreciated!

    August 3, 2015 at 10:10 am #161285
    Brad Dalton
    Participant

    Because you want to either insert HTML or use a short code, i think its best to create a new widget area. Choose the hook position using the guide i linked to and use that hook in the code i linked to.


    Tutorials for StudioPress Themes.

    August 3, 2015 at 12:24 pm #161305
    GoalSetter40s
    Participant

    I think the hook is going to be the [genesis_header], because that's the only one that is between the primary and secondary nav. I used your position guide technique to determine this. You can see it here:

    http://scbeach.com/dunes-village/overview/

    The problem is, whatever I place in this hook will appear on all pages. I only want it to appear on the same pages that the secondary menu appears on, in this example, all the pages for Dunes Village. I need some logic that says:

    If secondary nav is Dunes Village, use image01 in genesis_header
    If secondary nav is Margate Tower, use image02 in genesis_header

    I suppose I could use some conditional PHP code to check each page's ID to determine which image to display in the genesis_header.

    Ideally, I would like a way to always use image01 whenever secondary nav menu01 is used and image02 whenever secondary nav menu02 is used. That way the correct image appears in the genesis_header based on what secondary nav I choose for that page.

    To summarize, all pages that use the Dunes Village secondary nav will always show the image for Dunes Village, and all pages that use the Margate Tower secondary nav will always show the image for Margate Tower.

    August 3, 2015 at 12:54 pm #161309
    Brad Dalton
    Participant

    Try https://codex.wordpress.org/Function_Reference/has_nav_menu


    Tutorials for StudioPress Themes.

    August 4, 2015 at 12:36 pm #161406
    GoalSetter40s
    Participant

    I'm almost there! Thanks for much for your help.
    Here's the code I'm using in the genesis_header hook:

    <?php if ( has_nav_menu( 'secondary' ) ) : ?>
        <div class="cct-resortpage-headerimagenew"><img src="/images/dunes-village/dunes-village-header-new.jpg"></div>
    
    <?php endif; ?>

    What's left is to filter on the menu_id parameter, using:

     array(
    	'menu_id' => 'menu-dunes-village',
      )

    Here's the page:
    http://scbeach.com/dunes-village/overview/

    I don't know enough about PHP syntax to specify a specific menu_id in the PHP code.

    Your help would be greatly appreciated.

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