Title: Display posts from specific category
Last modified: August 18, 2016

---

# Display posts from specific category

 *  [Thad Allender](https://wordpress.org/support/users/endortrails/)
 * (@endortrails)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/display-posts-from-specific-category/)
 * Hi….I’m an ex-Movabletyper that recently switched to WordPress. I’m attempting
   to display specific categories, which, in Moveabletype would have been accomplished
   this way:
 * <MTEntries category=”category name”>….</MTEntries>
 * This seems like a simple task, but I’ve spent way to much time browsing topics
   that don’t specifically address this issue. Any help?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/display-posts-from-specific-category/#post-281195)
 * First: welcome to WP!
    I know the biggest challenge when switching from another
   script is to stop thinking in the “old way”. Usually the internal logic of two
   applications – even if on the surface they aim the same goal, like blogging –
   could be very different. It depends where do you want to display the posts of
   one category. By deafult, clicking on a category name in the sidebar – all the
   posts of that category will be displayed. If you want to avhieve this on the 
   main page of the blog, you’ll have to get familar with the [query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
   tag and apply it in your theme’s template file(s).
 *  Thread Starter [Thad Allender](https://wordpress.org/support/users/endortrails/)
 * (@endortrails)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/display-posts-from-specific-category/#post-281199)
 * Thanks for the reply. I figured it out. The problem arose because of the PLACEMENT
   of the tag required for this. Here is the tag (which I have set to display just
   posts from category 10 on my index page:
 * <?php if ( in_category(’10’) ): ?>
 * And here is where it should be placed in relation to The Loop:
 * <?php get_header(); ?>
 * <!– content …………………………… –>
    <div id=”content”>
 * <?php if (have_posts()) : ?>
 * <?php while (have_posts()) : the_post(); ?>
 * **<?php if ( in_category(’10’) ): ?>**
 * <hr class=”low” />
 * <div class=”entry”>
 * </h2>
 * <?php ($post->post_excerpt != “”)? the_excerpt() : the_content(); ?>
 * </div>
 * <?php endif; ?>
 * <?php endwhile; ?>
 * <?php else : ?>
 *  <h2>Not Found</h2>
    Sorry, but you are looking for something that isn’t here.
 * <?php endif; ?>
 * </div>
 * <!– /content –>
 * <?php get_sidebar(); ?>
 * <?php get_footer(); ?>
 *  [courtneyelizabeth](https://wordpress.org/support/users/courtneyelizabeth/)
 * (@courtneyelizabeth)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/display-posts-from-specific-category/#post-281853)
 * I have this functioning as a page template. But I’d like the information that
   I post on the page to be shown..IE. the page name and information, and THEN all
   of the posts in the category. Is there a way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display posts from specific category’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [courtneyelizabeth](https://wordpress.org/support/users/courtneyelizabeth/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/display-posts-from-specific-category/#post-281853)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
