• 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

Add header left widget Minimum 2.0

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 › Add header left widget Minimum 2.0

This topic is: not resolved
  • This topic has 16 replies, 3 voices, and was last updated 11 years, 8 months ago by Brad Dalton.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • June 6, 2013 at 10:10 am #44340
    genevishgraphics
    Member

    I would like to add a header left widget area to the Minimum 2.0 theme. I added
    `genesis_register_sidebar( array(
    'id' => 'header-left',
    'name' => __( 'Header Left', 'minimum' ),
    'description' => __( 'Header left widget area', 'minimum' ),
    ) );

    add_action( 'genesis_header', 'minimum_left_header_widget', 11 );
    function minimums_left_header_widget() {
    if (is_active_sidebar( 'header-left' ) ) {
    echo '';
    dynamic_sidebar( 'header-left' );
    echo '';
    }}
    `
    to my functions file and the left widget does appear in the back end, but when I add anything there, it does not displat on the front end. I did add a smaller version of the logo to the header to accomodate for the new widget area, but it still does not appear. I am sure I am missing something, I just dont know what it is!!

    --Update I saw a typo and changed
    `'minimum_left_header_widget', 11`
    to
    `'minimum_header_left_widget', 11 `
    I see the widget area appear in visual hook guide, but the content is not showing up - I think it has to do with my header covering it up??? How can I specify a new header image that is not FULL WIDTH>?

    June 6, 2013 at 11:51 am #44371
    Brad Dalton
    Participant

    Your function name doesn't match.

    Try this

    You'll also need to add some CSS and make some changes to your title area.

    Code not displaying? Grab it from Github.


    Tutorials for StudioPress Themes.

    June 6, 2013 at 11:54 am #44372
    genevishgraphics
    Member

    Yippeee thanks Brad!!!

    June 10, 2013 at 6:41 am #44995
    genevishgraphics
    Member

    One question - how would I remove this widget ONLY from the custom blog template I have created?

    June 10, 2013 at 6:45 am #44996
    Brad Dalton
    Participant

    You would add a conditional tag to exclude the widget from displaying or install the Widget Logic plugin and do the same thing.


    Tutorials for StudioPress Themes.

    June 10, 2013 at 6:56 am #45001
    genevishgraphics
    Member

    that is what I am struggling with - What is the right conditional tag? to only exclude the blog pages? Thanks for your help brad. I'm learning!

    June 10, 2013 at 7:07 am #45005
    genevishgraphics
    Member

    NM - got it - Just added the plugin and entered in !is_page('blog') and now the left header is on all my pages but the blog pages 🙂

    June 10, 2013 at 7:19 am #45008
    Brad Dalton
    Participant

    You learn fast!

    Alternatively, you could add the conditional tag to the code above:

    if (!is_page('blog') && is_active_sidebar( 'header-left' ) ) {
    

    Tutorials for StudioPress Themes.

    June 10, 2013 at 8:29 am #45029
    genevishgraphics
    Member

    Of course! Why didnt I think of that?? 🙂 Thanks Brad!

    June 10, 2013 at 9:01 am #45032
    genevishgraphics
    Member

    I have another question, and I am looking at your website for the answer but cant find it. I am adding a custom body class to my blog page, so I have have an alternate header image for the blog page- BUT I need that alternate image to be on all the blog posts and category pages as well. This would be a conditional tag issue again, I am using this
    `
    // Add custom body class to the head
    add_filter( 'body_class', 'minimum_add_body_class' );
    function minimum_add_body_class( $classes ) {
    $classes[] = 'page_blog';
    if(is_archive() ) {
    return $classes;
    }
    }
    `
    and now the correct header is there on the blog page, but it is duplicated with the other site header, and the post and category pages only have the old header instead of the "blog" header

    June 10, 2013 at 9:29 am #45041
    Brad Dalton
    Participant

    Try this.

    No need for a custom body class.

    Code not displaying? Grab it on Github.


    Tutorials for StudioPress Themes.

    June 10, 2013 at 1:37 pm #45108
    genevishgraphics
    Member

    Yes but if I want to customize the background color etc as well I have to use custom body class right?
    Why won't adding
    `
    if ( is_archive()) work?`

    June 11, 2013 at 1:53 am #45182
    Brad Dalton
    Participant

    That's another question.

    The one i answered relates to different header images on different pages.

    Personally i think you get more control over header images by using PHP rather than CSS or the custom header uploader to display them in your theme.

    You can add a custom body class if you want to or use the existing body class which you can grab from the source code.


    Tutorials for StudioPress Themes.

    September 23, 2013 at 9:53 pm #63924
    zmel
    Member

    Header left widget! Brad, thanks so much for the code! I was looking for this for days.

    September 23, 2013 at 10:00 pm #63928
    Brad Dalton
    Participant

    You could also change the float right to float left in the CSS code for the existing header right widget.


    Tutorials for StudioPress Themes.

    September 23, 2013 at 10:22 pm #63930
    zmel
    Member

    I was about to try that, but I needed two header widgets, so this will do the trick. Now I just need to add some CSS and move my title area. Thanks; I liked your FB page!

    September 24, 2013 at 8:32 am #63960
    Brad Dalton
    Participant

    Thanks for the like.

    I will write about this as its interesting and i would like to work out another solution that's easier.


    Tutorials for StudioPress Themes.

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