- This topic has 6 replies, 2 voices, and was last updated 10 years, 10 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘home feature wrap all pages’ is closed to new replies.
Home › Community Forums › Adapt Theme Support › home feature wrap all pages
How can I add the home feature wrap to the bottom of all pages?
You can add something like this in your functions.php file, and adjust where you want it to show –
add_action('genesis_before_footer', 'adapt_home_loop_helper_middle2');
function adapt_home_loop_helper_middle2() {
echo '<div class="home-feature-wrap">';
if ( is_active_sidebar( 'home-feature-1' ) ) {
echo '<div class="home-feature-1">';
dynamic_sidebar( 'home-feature-1' );
echo '</div><!-- end .home-feature-1 -->';
}
if ( is_active_sidebar( 'home-feature-2' ) ) {
echo '<div class="home-feature-2">';
dynamic_sidebar( 'home-feature-2' );
echo '</div><!-- end .home-feature-2 -->';
}
if ( is_active_sidebar( 'home-feature-3' ) ) {
echo '<div class="home-feature-3">';
dynamic_sidebar( 'home-feature-3' );
echo '</div><!-- end .home-feature-3 -->';
}
if ( is_active_sidebar( 'home-feature-4' ) ) {
echo '<div class="home-feature-4">';
dynamic_sidebar( 'home-feature-4' );
echo '</div><!-- end .home-feature-4 -->';
}
echo '</div><!-- end #home-feature-wrap -->';
}
Perfect-thank you! Just having a problem removing the home featured code on the home.php page. I’m gettting an error:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘adapt_home_loop_helper_middle’ was given in /home/dmrphd/public_html/wp-includes/plugin.php on line 405
http://dariarockholz.com/
Once you remove that section, you’ll also need to remove that same function from the top areas of the home.php
I have one last problem. My slider was right against the green area (home features) now there is extra space. There’s a “div inner” there but I can’t find where to remove this.
I got it – thanks for all your help
You’re Welcome!