Community Forums › Forums › Archived Forums › Design Tips and Tricks › Enterprise theme – How do I swap the HomeTop row and the HomeMiddle row?
- This topic has 6 replies, 2 voices, and was last updated 11 years, 1 month ago by weslinda.
-
AuthorPosts
-
March 5, 2013 at 5:33 pm #24445realityshifterParticipant
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?
March 5, 2013 at 6:13 pm #24452weslindaMemberIn 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!
March 5, 2013 at 6:26 pm #24455realityshifterParticipantThanks 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 -->';
}
March 5, 2013 at 6:38 pm #24459weslindaMemberI 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!
March 5, 2013 at 7:51 pm #24471weslindaMemberUnfortunately, 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!
March 5, 2013 at 8:11 pm #24472realityshifterParticipantIf 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.
March 6, 2013 at 9:44 am #24550weslindaMemberIt'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!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.