Sidebar Not Showing Due to PHP Loop
-
I currently have a small PHP loop designed to pull the sub pages of the page the loop is on. It works perfectly.
<div id="resource"> <?php query_posts(array('showposts' => 20, 'post_parent' => 1950, 'post_type' => 'page')); while (have_posts()) { the_post(); ?> <div class="video_thumbnail"><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_post_thumbnail('case-thumb'); ?></a></div> <div class="video_title"><span class="rc-label"><a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php bloginfo('template_url'); ?>/images/blinds-subpage-image.jpg&w=120&h=120&zc=1" alt="<?php the_title(); ?>" /></a></span> <?php the_content();?> <a class="rc-button" target="_blank" href="<?php the_permalink(); ?>">Learn More</a></div><div class="clear"></div> <?php } ?> </div>
The problem is for some reason this code is stopping the sidebar from appearing.
<div id="subRight"> <?php get_sidebar(); ?> </div><!--subRight-->
If I remove the loop code and leave the div blank, the sidebar appears so it has to be something involving this code. Any thoughts on why this would be a problem? Thank you!
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Sidebar Not Showing Due to PHP Loop’ is closed to new replies.