WordPress.org

Support

Support » Plugins and Hacks » widgets can filter recent post from one category

widgets can filter recent post from one category

Viewing 1 replies (of 1 total)
  • Edit – Category_name
    Edit – showposts=3

    ` <h3><?php _e(‘Recent Post by Category’,’cover-wp’) ?></h3>
    <?php query_posts(“showposts=3&category_name=Category_name”); $i = 1; ?>
    <ul>
    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    <li><a href=”<?php echo the_permalink(); ?>” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></a></li>
    <?php endwhile; ?>
    <?php else: ?>
    <p><?php _e(‘No Recent Posts by Category’,’cover-wp’) ?></p>
    <p><?php _e(‘Show your Recent Posts by Category Rename Category.’,’cover-wp’) ?></p>`

Viewing 1 replies (of 1 total)
  • The topic ‘widgets can filter recent post from one category’ is closed to new replies.
Skip to toolbar