• 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

Adding featured content areas – widgets – to homepage

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 › Adding featured content areas – widgets – to homepage

This topic is: not resolved

Tagged: featured content, homepage, streamline, widget

  • This topic has 5 replies, 3 voices, and was last updated 9 years, 6 months ago by geneburwood.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 4, 2014 at 10:47 am #88551
    wizz6113
    Member

    I am working on Streamline Pro in dev on localhost, so no site link. But basically, I need to replicate the 1st and middle homepage featured content 'widget' areas within the body content area of the home page (I have chosen static home page).

    I've successfully registered two new widget areas, and would be dragging Featured Page Advanced into them. However, I can't make the areas visible on the site so guess I need to use CSS to replicate the styling of the original slots, only renaming them. Can anyone suggest code / sequence of workflow to get this done?

    Thanks!

    http://localdev
    February 4, 2014 at 11:13 am #88556
    Brad Dalton
    Participant

    Use the same div classes as the ones you replicated but make sure the id.s are different.

    
    		
    		genesis_widget_area( 'home-featured-2', array(
    		//the home-featured-2 needs to be unique	
    		
    		
    			'before' => '<div class="home-featured-2 widget-area">',
    			//the home-featured-2 class can be replicated
    

    Tutorials for StudioPress Themes.

    February 4, 2014 at 2:07 pm #88597
    wizz6113
    Member

    Brad,
    Thanks for this and it worked fine! No white screen of death! Always nervous of that function php file even in local dev as php is a bit raw for me (learning while doing and trying to do a course on Lynda at the same time).

    I 've now got two replicated slots in the genesis_entry_content hook area. As they are running one below the other, and not left align and centre, I guess it's a case of replicating the original CSS styling for the original featured slots and adjusting the widget name.

    February 4, 2014 at 2:55 pm #88601
    wizz6113
    Member

    I am fiddling with the CSS code and am not sure if I use:

    a) .home-featured-4 (and .home-featured-5) for the two new widget areas (albeit they are in the genesis_entry_content area. And just slot them into the styling where the .home-featured-1,2,3 are placed so as not to replicate styling in entirety.

    b) Or...whether to create a new style area called (guessing here): .genesis . widget-area (and then having some other code to identify the new featured slots.

    Am in a bit of a quandary of this. I tried a version of (a) and screwed up the position of the current up top featured slots. So think it's (b) but not sure of the correct code.

    If you or another could point me in the right direction, that would great. Tnx.

    February 4, 2014 at 3:11 pm #88604
    wizz6113
    Member

    This is the code I now have in the functions.php:

    //* Add the page widget in the content - HTML5
    add_action( 'genesis_entry_content', 'home_featured_4' );
    function home_featured_4() {
    if ( is_front_page() )
    genesis_widget_area( 'home-featured-4', array(
    'before' => '<div class="home-featured-1">',
    ) );
    }

    //* Add the page widget in the content - HTML5
    add_action( 'genesis_entry_content', 'home_featured_5' );
    function home_featured_5() {
    if ( is_front_page() )
    genesis_widget_area( 'home-featured-5', array(
    'before' => '<div class="home-featured-2">',
    ) );
    }

    May 28, 2014 at 1:30 pm #107169
    geneburwood
    Participant

    Hey Wizz6113 - How did you make out with this? I am trying to do the exact same thing and having a challenge with the styling.

    I have the widgets created in functions.php, just can't get them to show...

    TIA

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

© 2023 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