Swap home page area 1 and highlight widget area

I want to put highlights widget area between home page area 1 and home page area 2. I am using ‘Home – Revolution Wide’ page template.

Solution which we will provide applies perfectly on other home page templates, too, but we will show it just for above mentioned template. Please follow these instructions:

1. open page-home-revolution.php

2. find these lines:

<?php if ( is_active_sidebar(2) ) { ?>
 <div id="homeHighlights">
 <?php dynamic_sidebar( 'Highlights' ); ?>
 </div>
 <?php } ?>

 <?php
 $area1 = get_option('tb_home_area_1', 'latest');
 if ($area1 != 'none') {
 get_template_part('home', $area1);
 }

 ?>

 <?php
 $area2 = get_option('tb_home_area_2', 'videos');
 if ($area2 != 'none') {
 get_template_part('home', $area2);
 }

 ?> 

 <?php
 $area3 = get_option('tb_home_area_3', '');
 if ($area3 != 'none') {
 get_template_part('home', $area3);
 }

 ?>

and change it to read:

<?php
 $area1 = get_option('tb_home_area_1', 'latest');
 if ($area1 != 'none') {
 get_template_part('home', $area1);
 }

 ?>

 <?php if ( is_active_sidebar(2) ) { ?>
<div id="homeHighlights">
<?php dynamic_sidebar( 'Highlights' ); ?>
</div>
<?php } ?>

<?php
 $area2 = get_option('tb_home_area_2', 'videos');
 if ($area2 != 'none') {
 get_template_part('home', $area2);
 }

 ?> 

 <?php
 $area3 = get_option('tb_home_area_3', '');
 if ($area3 != 'none') {
 get_template_part('home', $area3);
 }

 ?>

NOTE: you can make desirable order easily if you follow above logic (i.e. area1 Рarea2  highlights Рarea 3, or area1 Рarea2 Рarea3 Рhighlights)

0