• 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)
  • Thread Starter ServerStorm

    (@serverstorm)

    Wow the problem was misleading. It turns out that in both cases the widgets that didn’t appear to working had funky C.S.S. attached that either rendered them well of the screen/hidden or behind something with a higher z-index. It took about 5 minutes looking in Firebug to see what was happening… there was a big waste of 3 hours for something so simple – Lesson learned just like when your electronic device doesn’t turn on check if it is plugged in before diagnosis the hardware I should have checked the display/rendering logic before diving in looking for a code/cache/voodoo solution.

    I love this forum cause the three times I’ve posted know one – not even esmi – has answered my posts and I end up having to figure things out myself. While that’s good, I asked the questions to try to save the time, but I guess either I don’t ask well enough or the topics I am discussing are of interest to very few?

    Cheers,
    Steve

Viewing 1 replies (of 1 total)
  • The topic ‘All Widgets Fail After WP Loop’ is closed to new replies.