Enterprise theme – How do I swap the HomeTop row and the HomeMiddle row?

Community Forums Forums Design Tips and Tricks Enterprise theme – How do I swap the HomeTop row and the HomeMiddle row?

This topic is: not resolved

This topic contains 6 replies, has 2 voices, and was last updated by  weslinda 1 year, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24445

    realityshifter
    Participant
    Post count: 3

    I want to swap the placement of the HomeTop widget row and the HomeMiddle widget row. The HomeTop row currently has two widgets (one with text and the other with the wp-cycle image slider in it), and the HomeMiddle row currently has three Featured Page widgets. I’m trying to put the three Featured Page widgets on top and move the row with the slider so it appears below them instead of above them.

    I’ve looked at the home.php and functions.php files but I’m not sure what changes I should make to either of those files to make this happen. Can anyone help?

    #24452

    weslinda
    Participant
    Post count: 193

    In your home.php file, you’ll find the following code.

    genesis_widget_area( ‘home-slider’, array(
    ‘before’ => ‘<div class=”home-slider widget-area”>’,
    ) );

    genesis_widget_area( ‘home-top’, array(
    ‘before’ => ‘<div class=”home-top widget-area”>’,
    ) );

    Swap those two sections.

    genesis_widget_area( ‘home-top’, array(
    ‘before’ => ‘<div class=”home-top widget-area”>’,
    ) );
    genesis_widget_area( ‘home-slider’, array(
    ‘before’ => ‘<div class=”home-slider widget-area”>’,
    ) );

    This should swap the layouts.  There may be some need to edit CSS for fine tuning.


    Loving the Genesis Life!

    #24455

    realityshifter
    Participant
    Post count: 3

    Thanks for the quick reply. I appreciate it! I looked in my home.php file but I don’t see anything that says home-slider in it. This is what’s in the file now:

    add_action( ‘genesis_after_header’, ‘enterprise_home_top_helper’ );
    /**
    * Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle.
    */
    function enterprise_home_top_helper() {

    echo ‘<div id=”home-top-bg”><div id=”home-top”><div class =”wrap”>’;

    if ( is_active_sidebar( ‘home-top-1′ ) ) {
    echo ‘<div class=”home-top-1″>’;
    dynamic_sidebar( ‘home-top-1′ );
    echo ‘</div><!– end .home-top-1 –>’;
    }
    echo ‘<div class=”home-top-2″>’;
    if ( function_exists( ‘wp_cycle’ ) )
    wp_cycle();
    echo ‘</div><!– end .home-top-2 –>’;
    echo ‘</div><!– end .wrap –></div><!– end #home-top –></div><!– end #home-top-bg –>’;

    }

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

    if ( is_active_sidebar( ‘home-middle-1′ ) || is_active_sidebar( ‘home-middle-2′ ) || is_active_sidebar( ‘home-middle-3′ ) ) {

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘enterprise_home_loop_helper’ );
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    }
    }

    function enterprise_home_loop_helper() {

    echo ‘<div id=”home-middle”>’;

    if ( is_active_sidebar( ‘home-middle-1′ ) ) {
    echo ‘<div class=”home-middle-1″>’;
    dynamic_sidebar( ‘home-middle-1′ );
    echo ‘</div><!– end .home-middle-1 –>’;
    }

    if ( is_active_sidebar( ‘home-middle-2′ ) ) {
    echo ‘<div class=”home-middle-2″>’;
    dynamic_sidebar( ‘home-middle-2′ );
    echo ‘</div><!– end .home-middle-2 –>’;
    }

    if ( is_active_sidebar( ‘home-middle-3′ ) ) {
    echo ‘<div class=”home-middle-3″>’;
    dynamic_sidebar( ‘home-middle-3′ );
    echo ‘</div><!– end .home-middle-3 –>’;
    }

    echo ‘</div><!– end #home-middle –>’;

    }

    #24459

    weslinda
    Participant
    Post count: 193

    I sincerely apologize.  I read “executive” instead of “enterprise” and gave you the how to for Executive.  Give me a few minutes to look through the file.  I want to make sure I’m doing this correctly for you.


    Loving the Genesis Life!

    #24471

    weslinda
    Participant
    Post count: 193

    Unfortunately, I do not see an easy way to do this without rewriting the home page and css of the theme.  It can be done, but would require some work.


    Loving the Genesis Life!

    #24472

    realityshifter
    Participant
    Post count: 3

    If it’s too complicated to swap the position of the two rows, is it possible to remove the HomeTop row altogether and replace it with another row that looks like HomeMiddle with three Featured Page widgets?

    The wp-cycle/slider row is taking up a lot of valuable space near the top of the page and we’d rather have our customers see the row with the three Featured Page widgets first. (Each page describes one of our products, so for our purposes it’s better to position those where the customers will see them right away.)  If we could replace the slider row with more Featured Page widgets, that might be an even better solution than moving the slider row further down the page.

    #24550

    weslinda
    Participant
    Post count: 193

    It’s not that it’s too complicated, it just requires an hour or two of development to get it clean.  As for your second request, that is possible as well.  Perhaps a little easier, but would take about an hour to do.

    Any Genesis Developer would be able to assist you with this, but it’s likely to require a small investment for their time.


    Loving the Genesis Life!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.