• 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

Where can I find the Header Right function?

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 › Where can I find the Header Right function?

This topic is: resolved

Tagged: header-right on inside pages only

  • This topic has 13 replies, 3 voices, and was last updated 13 years, 7 months ago by Jen Baumann.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • December 13, 2012 at 11:53 pm #5175
    Axman1413
    Member

    My client wants me to add a logo/header in the area where the Header Right Widget will be. However, she doesn'tw ant it ont he Home page, where we have the slider. So I'm guessing it would be something like:

    remove_action--genesis_header_right...so on

    if (is_front_page)...something, something ...hehehe.

    I just can't find the initial widget function to copy in order to ad the conditional remove function to the Executive function.php.

    I am  intermediate with php. I am better at manipulating than writing. So if you can lead me in the right direction, or just provide the correct function call so I can have the Header Right widget appear on all pages, EXCEPT the static Home page.

     

    Thanks,

    Johnny

    December 14, 2012 at 9:41 am #5212
    AnitaC
    Keymaster

    So this is how you would actually remove it all together -

    /** Remove the header right widget area */
    unregister_sidebar( 'header-right' );

    But, if you only want to remove it from the home and show it on the single post/pages, then you need to add to your code the "is_single()" function.

    I found a blog that might help you - scroll down where it says, "Can I say Which Pages the Widget Shows Up On? - http://journalxtra.com/easyguides/howto-add-widgets-genesis-child-themes-4876/.

    Sorry I cannot be of more help. I am not good at this either.


    Need help with customization or troubleshooting? Reach out to me.

    December 14, 2012 at 5:12 pm #5290
    Axman1413
    Member

    Well the problem I'm having is that I just want it removed from the front_page, not the home_page. If it were the home_page, I could just jump in that file and alter it. But the static home page doesn't have this availability in Genesis.

    I've been looking at Nick's stuff, but I'm spending way too much time on this. I could have gotten all these results using my Pro Version of WeaverII, where I don't have to code. It's frustrating, when a client insists on a theme, but then wants to make crazy changes.

    I just need to find the add_action function for the header-right in the Genesis files, so I can copy it an rewrite it in the child f.p to not show on the is_front_page

    So I'm not sure if a filter would work or what the best option is. There is a ton of material on adding things, but not a lot on removing them.

    Johnny

    December 14, 2012 at 5:20 pm #5294
    AnitaC
    Keymaster

    Sorry I couldn't be of more help and I see no one else has chimed in. I did another Google search and found this - http://stackoverflow.com/questions/11206736/wordpress-genesis-theme-changing-the-logo-from-text-to-graphic and it has the following code in it - but read the link.

    if ( is_active_sidebar( 'header-right' ) || has_action( 'genesis_header_right' ) ) {
    echo '';
    do_action( 'genesis_header_right' );
    dynamic_sidebar( 'header-right' );
    echo '';
    }
    }


    Need help with customization or troubleshooting? Reach out to me.

    December 14, 2012 at 5:24 pm #5295
    Axman1413
    Member

    LOL, Thanks Anita (funny...that's my client's name) I just found that code in the Genesis files. Now let's see if I can rewrite it correctly.

    Johnny

    December 14, 2012 at 5:25 pm #5296
    AnitaC
    Keymaster

    I know... I have a great name! Good luck, let me know how it turns out.


    Need help with customization or troubleshooting? Reach out to me.

    December 14, 2012 at 5:31 pm #5297
    AnitaC
    Keymaster

    This article on this link says you need to specify that you want it on "single posts" only (not home page). Scroll down to the bottom and you should see it - http://blogvkp.com/add-widget-in-genesis-child-theme/.


    Need help with customization or troubleshooting? Reach out to me.

    December 14, 2012 at 6:31 pm #5303
    Axman1413
    Member

    Well I'm not sure, but this is what I'm thinking. I just don't know how to introduce it into the child function.php:

    if ( is_active_sidebar( 'header-right' ) || has_action( 'genesis_header_right' ) ) {
    if (is_front_page() {
    echo '';
    }
    if (is_page() {
    echo '^div class="widget-area"^';
    do_action( 'genesis_header_right' );
    dynamic_sidebar( 'header-right' );
    echo '^/div^^!-- end .widget-area --^';
    }
    }

    In the child theme, it just calls the entire genesis_custom_header, so there is more needed to get this to interact with the child theme.

    I'm using"^" in place of "&gt/&lt"

    Johnny

    December 15, 2012 at 9:18 am #5405
    Jen Baumann
    Participant

    Try this: http://dreamwhisperdesigns.com/genesis-tutorials/remove-genesis-header-widget-homepage/

    December 15, 2012 at 9:22 am #5406
    AnitaC
    Keymaster

    Hi Jen, thank you for helping. I thing he and I were at our wits end! Now, that code you supplied - does it go into the Functions.php file?


    Need help with customization or troubleshooting? Reach out to me.

    December 15, 2012 at 9:25 am #5407
    Jen Baumann
    Participant

    Yep!

    December 15, 2012 at 9:37 am #5408
    AnitaC
    Keymaster

    Great. Can you delete or close my post in the General area pertaining to this? Thank you.


    Need help with customization or troubleshooting? Reach out to me.

    December 15, 2012 at 10:07 am #5414
    Axman1413
    Member

    Wonderful...wonderful!!! The only change I had to make was to put (is_front_page) in place of (is_home).

    Thank you both for all your help.

    Johnny

    December 15, 2012 at 10:10 am #5415
    Jen Baumann
    Participant

    Great!

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Where can I find the Header Right function?’ is closed to new 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