• 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

Outreach Theme – Extra Widgets Row

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 › Outreach Theme – Extra Widgets Row

This topic is: resolved

Tagged: home.php, outreach, widget

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 2 months ago by justinheron.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 13, 2013 at 2:45 pm #11636
    justinheron
    Member

    I am using the current Outreach theme which has 4 widgets through the centre of the home page, what I would like to do is add another identical row of 4 beneath these to give me 8 in total.

    I have added 4 more in to the functions.php file and these appear in my dashboard fine for me to use (still in place) but when I add code to the home.php file, whatever I seem to do, once I have saved the changes seems to just give me blank web page so I know something is wrong.

    My present home.php code is  below, is anyone able to show/edit this for me as to the correct place to enter the additional items? I have added widget rows into other Genesis themes before but never had this problem.

    <?php

    add_action( 'genesis_meta', 'outreach_home_genesis_meta' );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function outreach_home_genesis_meta() {

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

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'outreach_home_featured' );
    add_action( 'genesis_before_footer', 'outreach_home_sections', 3 );
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    add_filter( 'body_class', 'add_body_class' );

    function add_body_class( $classes ) {
    $classes[] = 'outreach';
    return $classes;
    }

    }
    }

    function outreach_home_featured() {

    if ( is_active_sidebar( 'home-featured' ) ) {
    genesis_widget_area( 'home-featured', array(
    'before' => '<div class="home-featured widget-area">'
    ) );
    }

    }

    function outreach_home_sections() {

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

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

    genesis_widget_area( 'home-1', array(
    'before' => '<div class="home-1 widget-area">',
    ) );

    genesis_widget_area( 'home-2', array(
    'before' => '<div class="home-2 widget-area">',
    ) );

    genesis_widget_area( 'home-3', array(
    'before' => '<div class="home-3 widget-area">',
    ) );

    genesis_widget_area( 'home-4', array(
    'before' => '<div class="home-4 widget-area">',
    ) );

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

    }

    }

    genesis();

    Hope someone can point me in the right direction with this one!

    Many thanks,

    Justin

    January 13, 2013 at 3:20 pm #11646
    justinheron
    Member

    I now seem to have been able to add to the home.php file without the site crashing but the sample text I have added in to the widgets on the wordpress dashboard isnt displaying.

    I have left the changes that I have made to the functions.php and hone.php files in place in case someone needs / wants to take a look at them as I obviously have something wrong still somewhere.

    The site can be viewed at http://www.kopthat.co.uk

    January 13, 2013 at 10:10 pm #11745
    ChicGeek
    Member

    Hi,

    I'm trying to do the same thing in Agency. Can you let me know how you did this. I added an extra row, but want them in their own section and that's where I'm getting stuck. Not sure what to name the hook. I got them in and added the widgets and see I need to duplicate this and that's where I'm stuck:

    function agency_home_loop_helper() {

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

    echo '<div id="home">';

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

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

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

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

    }

    I was reading a thread that had the same question over the weekend and can't seem to find it.

    Thanks!

    Elisha


    The Pixel Spot ♥ A Recommended STUDIOPRESS Customizer ♥ I Tweet

    Genesis Junkie + Web & Graphic Designer + Ad World Girl + Student of Life

    January 19, 2013 at 7:29 pm #13193
    justinheron
    Member

    After playing around with this for a while and hunting everything down in the CSS as well I got it to display!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Outreach Theme – Extra Widgets Row’ 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

© 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