Thursday, 12 September 2013

Wordpress - is category dont works

Wordpress - is category dont works

I'm new to wordpress, I'm trying to display custom html divs for one
category (with ID 7). So this is my code..
<?php if(have_posts()) : ?>
<?php is_category( '7' ); ?>
<?php echo 'test'; ?>
<?php while(have_posts()) : the_post(); ?>
<article <?php post_class(); ?>>
<div class="latest-posts">
<div class="latest-posts-info">
<div class="title"><h1><?php the_title(); ?><h1></div>
<div class="text">
<?php the_excerpt(); ?>
</div>
<a href="<?php the_permalink() ?>"
class="read-more">Read more...</a>
<div class="clear"></div>
</div>
<div class="latest-posts-img">
<?php //echo get_the_post_thumbnail(); ?>
<?php custom_get_post_attachments(get_the_ID(),
$__width, $__height, get_the_title()); ?>
</div>
<div class="clear"></div>
</div>
</article>
<?php endwhile; else: ?>
<div class="content">
<p class="not-found-p">No articles found!</p>
</div>
<?php endif; ?>
It should display TEST for that category, but it doesnt. Whats wrong?
Thanks!

No comments:

Post a Comment