levani
09-22-2009, 12:47 PM
This is a beginning of my wordpress looop. On line 9 if I change if($comm->has_comment > 0) with while($comm->has_comment > 0) it generates Error 500! Internal Server Error! Can php cause 500 error?
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$comm = get_comments_number( $id );
if($_GET['withcomments']) {
if($comm->has_comment > 0) {
?>
<?php echo $chemikitxvebi->post_author; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="gare_avatari"><?php echo get_avatar( get_the_author_id(), '50' ); ?></div>
<?php // if there's a thumbnail
if($thumb !== '') { ?>
<?php } // end if statement
// if there's not a thumbnail
else { echo ''; } ?>
<div class="satauri"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div><p class="post-footer align-left"><?php the_category(', ') ?> | </p>
<div style="clear:both"></div>
</div>
<?php
}
} elseif($_GET['withoutcomments']) {
if($comm < 1) {
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$comm = get_comments_number( $id );
if($_GET['withcomments']) {
if($comm->has_comment > 0) {
?>
<?php echo $chemikitxvebi->post_author; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="gare_avatari"><?php echo get_avatar( get_the_author_id(), '50' ); ?></div>
<?php // if there's a thumbnail
if($thumb !== '') { ?>
<?php } // end if statement
// if there's not a thumbnail
else { echo ''; } ?>
<div class="satauri"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div><p class="post-footer align-left"><?php the_category(', ') ?> | </p>
<div style="clear:both"></div>
</div>
<?php
}
} elseif($_GET['withoutcomments']) {
if($comm < 1) {