• 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

Home featured Left/Right

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 › Home featured Left/Right

This topic is: not resolved

Tagged: balance theme, featured, Home Featured

  • This topic has 6 replies, 2 voices, and was last updated 12 years, 2 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • April 3, 2013 at 5:31 am #32795
    brook1979
    Member

    Hi People,

    I want to add another home featured left and right BUT only display it on a category page, can anyone point me in the right direction??

    I know how to add the widget area and css for the new ones, BUT I'm stuck here! I know it's by using a conditional but Im not sure how to write this.

    Thanks in advance if anyone can help.

    April 3, 2013 at 7:47 am #32808
    Brad Dalton
    Participant

    Just published a post on this on my blog.

    Please let me know if you need any help with it.


    Tutorials for StudioPress Themes.

    April 3, 2013 at 8:10 am #32819
    brook1979
    Member

    Hi Brad,

    Thanks for taking the time to help, much appreciated. Here's what I have done up to now. I was going to try and explain what ive done, BUT ive messed with it that much Im getting confused....SO heres what ive done in the code.

    Registered the new featured areas:

    genesis_register_sidebar( array(
    'id'                => 'case-featured-left',
    'name'            => __( 'Case Featured Left', 'balance' ),
    'description'    => __( 'This is the featured left area for case studies.', 'balance' ),
    ) );

    genesis_register_sidebar( array(
    'id'                => 'case-featured-right',
    'name'            => __( 'Case Featured Right', 'balance' ),
    'description'    => __( 'This is the featured right area for case studies.', 'balance' ),
    ) );

    Then on the home page (I know they shouldnt be on the home.php, BUT im not clear on where to add them).

    function balance_home_loop_helper() {

    if ( is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) ) {

    echo '<div id="home-featured"><div class="wrap clearfix">';

    echo '<div class="home-featured-left">';
    dynamic_sidebar( 'home-featured-left' );
    echo '</div><!-- end .home-featured-left -->';

    echo '<div class="home-featured-right">';
    dynamic_sidebar( 'home-featured-right' );
    echo '</div><!-- end .home-featured-right -->';

    echo '</div><!-- end .wrap --></div><!-- end #home-featured -->';

    echo '<div id="case-featured"><div class="wrap clearfix">';

    echo '<div class="case-featured-left">';
    dynamic_sidebar( 'case-featured-left' );
    echo '</div><!-- end .case-featured-left -->';

    echo '<div class="case-featured-right">';
    dynamic_sidebar( 'case-featured-right' );
    echo '</div><!-- end .case-featured-right -->';

    echo '</div><!-- end .wrap --></div><!-- end #case-featured -->';

    }

    }

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_grid_loop_helper' );

     

    Can you point me in the right direction from here?

    Your assistance is much appreciated.

    Carl

    April 3, 2013 at 8:27 am #32821
    brook1979
    Member

    Hi Brad,

    Using your code JUST in my functions.php file and the NEW featured areas are now showing, HOWEVER they are appearing on the home page...heres the code.

    /** Add the sub widget section */
    add_action( 'genesis_after_header', 'wpsites_sub_widget', 5 );
    function wpsites_sub_widget() {
    if ( is_category ('case-studies') || is_active_sidebar( 'case-featured-left' ) || is_active_sidebar( 'case-featured-right' ) ) {
    echo '<div id="case-featured"><div class="wrap clearfix">';

    echo '<div id="case-featured"><div class="wrap clearfix">';

    echo '<div class="case-featured-left">';
    dynamic_sidebar( 'case-featured-left' );
    echo '</div><!-- end .case-featured-left -->';

    echo '<div class="case-featured-right">';
    dynamic_sidebar( 'case-featured-right' );
    echo '</div><!-- end .case-featured-right -->';

    echo '</div><!-- end .wrap --></div><!-- end #case-featured -->';

    }
    }

    At least now I have them showing, feel one step closer now so thanks for that, BUT can you add to this to help me get the new featured areas to just display on the specific category page.

    Thanks.

    Carl

    April 3, 2013 at 8:32 am #32822
    Brad Dalton
    Participant

    Did you paste the code in your child themes functions.php file or the home.php file?

    Should in in functions.php

    Otherwise, try changing the conditional tag to the category i.d

    if ( is_category (‘case-studies’)
    

    I'd test this on a local install first using your theme.


    Tutorials for StudioPress Themes.

    April 3, 2013 at 8:57 am #32830
    brook1979
    Member

    Hi Brad,

    I pasted your code "as above" in the functions.php fil. Id the code above correct??

    I did use the conditional

    if ( is_category (‘case-studies’)
    
    April 3, 2013 at 9:08 am #32834
    Brad Dalton
    Participant

    For the category i.d Not the category slug sorry:

    if ( is_category (‘007’)
    

    Did you remove the code from the home.php file?


    Tutorials for StudioPress Themes.

  • 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

© 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