- This topic has 4 replies, 2 voices, and was last updated 10 years, 10 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Community Forums › Adapt Theme Support › adding widget on each side of slider
Could you steer me in the right direction to add a widget to each side of the slider section?
thanks
Kris
Take a look at your home.php file where the slider widget/content currently is, and duplicate it twice. Make sure the 2 new widgets that you duplicate are renamed so you don’t have more than 1 of the same function. Also remember to register you widget in your functions.php file.
Ok, I have been working on this and I am missing something and can’t get it figured out. This is what I have for my home.php, I have tried a few different things so I know this one is wrong.
/**
* Display widget content for “slider” and “welcome” sections.
*
*/
function adapt_home_loop_helper_top() {
echo ‘<div>’;
if ( is_active_sidebar( ‘box-1’ ) ) {
echo ‘<div>’;
dynamic_sidebar( ‘box-1’ );
echo ‘</div><!– end .box-1 –>’;
}
if ( is_active_sidebar( ‘slider’ ) ) {
echo ‘<div>’;
dynamic_sidebar( ‘slider’ );
echo ‘</div><!– end .slider –>’;
}
if ( is_active_sidebar( ‘box-2’ ) ) {
echo ‘<div>’;
dynamic_sidebar( ‘box-2’ );
echo ‘</div><!– end .box-2 –>’;
}
echo ‘</div><!– end #slider-wrap –>’;
}
echo ‘<div>’;
if ( is_active_sidebar( ‘welcome’ ) ) {
echo ‘<div><div>’;
dynamic_sidebar( ‘welcome’ );
echo ‘</div><!– end .welcome-wrap –></div><!– end .welcome-inner –>’;
}
echo ‘</div><!– end #welcome-wrap –>’;
my website is http://www.kriscovert.com
Thanks
Kris
OK, so I have done some more work on it, I can’t get the box-2 (right widget of the slider) to be in the right position)
Thanks
Kris
Looks like you’ll need to add a width to the slider (middle widget) and you would also need to set it to float left as well.