WordPress.org

Ready to get started?Download WordPress

Forums

Show Post category needed (2 posts)

  1. thirsty.bunny
    Member
    Posted 2 years ago #

    hello, please can anyone help me with this ?
    how can i show the Category name in this code ?

    <?php
    $posts = get_posts('category=5,6,7,8&numberposts=3');
    foreach($posts as $post):
    setup_postdata($post);
    ?>
    														<td width="345" valign="top">
    														<div class="section-large">
                                                              <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/includes/timthumb.php?src=<?php get_thumbnail($post->ID, 'full'); ?>&h=208&w=285&zc=1" alt="<?php the_title(); ?>" /></a>
    														 <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
    																<span><?php the_time('l, F jS, Y') ?></span>
    <span>SHOW CATEGORY NAME HERE</span>
    </div>
    
     <?php endforeach; ?>
  2. gerbilk
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags