Post by Catergory
-
Just wondering if anyone could tell me how to make the following code display posts of only the current catergory. At the moment it displays post from all catergories.
“
<?php $catergory = new WP_Query(cat_id=current_catergory); while($catergory->have_posts()) : $catergory ->the_post(); ?><?php if( get_post_meta($post->ID, “homethumb”, true) ): ?>
” rel=”bookmark”><img style=”float:left;margin:0px 10px 0px 0px;” src=”<?php echo get_post_meta($post->ID, “homethumb”, true); ?>” alt=”<?php the_title(); ?>” />
<?php else: ?>
” rel=”bookmark”><img style=”float:left;margin:0px 10px 0px 0px;” src=”<?php bloginfo(‘template_url’); ?>/images/thumbnail.png” alt=”<?php the_title(); ?>” />
<?php endif; ?>
<b>” rel=”bookmark”><?php the_title(); ?></b>
<?php the_content_limit(350, “[Read more]”); ?> ”
The topic ‘Post by Catergory’ is closed to new replies.