• 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 Featured Pages to Already Altered Static Homepage in Streamline

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 › Add Featured Pages to Already Altered Static Homepage in Streamline

This topic is: not resolved
  • This topic has 3 replies, 2 voices, and was last updated 12 years, 3 months ago by cehwitham.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 30, 2013 at 11:47 am #38598
    swansonwc
    Member

    Hi,

    I have a static homepage in Streamline that I've already edited to display an image slider above the page content. Now, I'd like to use Home Featured areas above the slider and sidebar. The site is: http://75.103.78.29/~kellyswa/

    Here are the changes I've made to the functions.php earlier:

    functions.php

    `
    genesis_register_sidebar( array(
    'id' => 'home-custom',
    'name' => __( 'Home Slider', 'streamline' ),
    'description' => __( 'This is the slider widget area for your homepage.', 'streamline' ),
    ) );

    add_action( 'genesis_before_loop', 'child_before_content');
    function child_before_content() {
    if ( is_page(2) ){ echo '';
    dynamic_sidebar( 'home-custom' );
    echo '';
    }

    }
    `

    http://75.103.78.29/~kellyswa/">http://75.103.78.29/~kellyswa/
    June 2, 2013 at 5:35 pm #43709
    cehwitham
    Participant

    Have you added the Featured Page widget into the sidebar you created?

    Chris


    Twitter: cehwitham Web: cehwitham.com

    June 3, 2013 at 7:56 am #43811
    swansonwc
    Member

    Chris,

    Thank you for responding to my post.

    I added the Genesis Responsive Slider to the custom sidebar area that I created. However, I didn't create a custom sidebar for the Featured Page Widget, because it already exists on the functions.php page:
    `genesis_register_sidebar( array(
    'id' => 'home-featured-1',
    'name' => __( 'Home Featured #1', 'streamline' ),
    'description' => __( 'This is the featured #1 column on the homepage.', 'streamline' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-featured-2',
    'name' => __( 'Home Featured #2', 'streamline' ),
    'description' => __( 'This is the featured #2 column on the homepage.', 'streamline' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-featured-3',
    'name' => __( 'Home Featured #3', 'streamline' ),
    'description' => __( 'This is the featured #3 column on the homepage.', 'streamline' ),
    ) ); `

    I did add the Featured Page widget to this sidebar, but it doesn't show up because I'm not using the home.php page. Here's the code on the home.php page that I think should go on the functions.php page:
    `add_action( 'genesis_meta', 'streamline_home_genesis_meta' );
    /**
    * Add widget support for homepage.
    *
    */
    function streamline_home_genesis_meta() {

    if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) {

    add_action( 'genesis_before_content_sidebar_wrap', 'streamline_home_loop_helper' );

    }
    }

    /**
    * Display widget content for home featured sections.
    *
    */
    function streamline_home_loop_helper() {

    if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) {

    echo '';

    echo '';
    dynamic_sidebar( 'home-featured-1' );
    echo '';

    echo '';
    dynamic_sidebar( 'home-featured-2' );
    echo '';

    echo '';
    dynamic_sidebar( 'home-featured-3' );
    echo '';

    echo '';

    }

    }`

    This is the code that added the slider to the static page (page id 2), and this is the page where I'd like the Featured Page widget to show up above the slider:
    `add_action( 'genesis_before_loop', 'child_before_content');
    function child_before_content() {
    if ( is_page(2) ){ echo '';
    dynamic_sidebar( 'home-custom' );
    echo '';
    }

    }
    `

    I hope that the above is concise enough to help.

    Thanks for your help,
    Bill

    August 25, 2013 at 7:01 am #58714
    cehwitham
    Participant

    If you're not using home.php could you add the code to front-page.php instead?


    Twitter: cehwitham Web: cehwitham.com

  • 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

© 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