Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Get wordpress posts by category name..!

<?php query_posts('category_name=CATEGORYNAME&showposts=5');

while (have_posts()) : the_post(); ?>

the_title();   // To display the title of all posts that have category name selected 

the_content();   // To display the content of all posts that have category name selected 


<?php endwhile; ?>
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Get #wordpress #posts #category
ADD COMMENT
Topic
Name
7+8 =