All Widgets Fail After WP Loop
-
Hi,
I am developing a custom theme. Generally it is going well, but I have one issue that I can’t seem to figure out. Any widgets I put (as dynamic sidebars) fail after the content loop code.
I am not sure if the failure relates to the loop, but all widgets work above the loop and to the direct right of the loop, but none work below the loop; therefore chances are something is causing those widgets to fail because of the loop.
My widgets are very basic. This is an example of the widget defined in the functions.php file:
register_sidebar( array( 'name' => __('space_c1'), 'before_widget' => '', 'after_widget' => "", 'before_title' => '', 'after_title' => '', ) );
And here is where it is placed in the index.php file – this one works -:
<!-- WIDGET [space_c1] --> <div id='space_c1' class='widget-area'> <?php if (is_active_sidebar('sidebar-14')){ dynamic_sidebar('space_c1'); } else { ?> <p class='blue_header'>Support and Remembrance</p> <div class='slideshow'> <div class='slide'> <h3>Support Our Troops</h3> <p> We would like to pass our thanks and support to the families and members of our Armed Forces. </p> </div> </div> <?php }?>
But any below this do not work?
<div id='home_content' class='left_content'> <?php get_template_part( 'content' ); ?> </div>
Any Ideas?
Thanks Steve
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘All Widgets Fail After WP Loop’ is closed to new replies.