PHP if statement sucking footer into wrapper
-
Hi,
This isn’t causing a problem at the moment (not unless it’s causing IE to screw up my sidebar which I’m still researching/investigating) but I noticed my footer was getting attached to my content wrapper whenever I was calling a page with a php if statement that calls a specific category of posts that are constructed in a different way to rest of my posts. For example, some of my posts are full on article/blog posts while others are just snippets of text and links. Here is my blog for to be clear.
I suspect it this snippet of code, so any help would be really appreciated.
<!-- loop --> <?php if (have_posts()) :?> <?php $postCount=0; ?> <?php while (have_posts()) : the_post();?> <?php $postCount++;?> <?php if ( in_category('3') ) { ?> <div class="mpartgeneral"> <?php the_content ('Read the rest of this entry »'); ?> <div class="date"><?php the_date('d-m-Y') ?> </div> </div> <?php } else { ?> <div class="mpart"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1> <h2><?php the_author() ?> | Filed under <?php the_category(', ') ?></h2> <?php the_content ('Read the rest of this entry »'); ?> <? if (function_exists('social_bookmark')) { social_bookmark(); } ?> <div class="date"><?php comments_popup_link('Comment now »', '1 Comment »', '% Comments »', 'commentslink'); ?> . <?php the_date('d-m-Y') ?></div> <br/> <div class="commentsblock"> <?php comments_template(); ?> </div> <?php } ?> <?php endwhile; ?> <?php else : ?> <h3> Not Found </h3> <strong>Sorry, but you are looking for something that isn't here.</strong> <?php endif; ?> <!-- end loop -->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP if statement sucking footer into wrapper’ is closed to new replies.