How to add an categories for a lastest post list.
-
How to add an categories for a lastest post list so it just show the lastest post of a categories:
[please mark any code with the ‘code’ button]
<ul> <?php query_posts( 'showposts=5' ); if ( have_posts() ) : while ( have_posts() ) : the_post();?> <li> <a>"><?php the_title(); ?></a> </li> <?php wp_reset_query(); ?> </ul>
As we know the code above show the all lastest post in list format. While in this case, I’m putting this latest list in my footer and separate it into 3 parts:
1. lastest post of categories 1
2. lastest post of categories 2
3. lastest post of categories 3How could I suppose to add categories in the code above ? ( the code will repeat 3 tmes for 3 different categories that for sure.)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add an categories for a lastest post list.’ is closed to new replies.