You can do it using the following loop:
<?php
$cat_477 = new WP_Query();
$cat_477->query('cat=477&showposts=4');
while($cat_477->have_posts()) : $cat_477->the_post(); ?>
<h3><a href="https://wordpress.stackexchange.com/questions/77679/<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php echo get_the_excerpt(); ?></p>
<?php endwhile; ?>
The number 477 is the ID of one category.
The variable $cat_477 is where we save the MySQL query for one category (477 in this case).
The number 4 is the number of posts to show.
You only need to know the ID of each category, change the numbers and create so many loops as you want.
Related Posts:
- All categories displays the same posts
- Having pages after specifying post_type post
- Unable to differentiate between two categories under custom post type on single.php
- In what context should Categories and Tags be used
- Exclude post category in a blog page
- Show posts on front page only
- list posts from two categories on a page – plugin not working
- Retrieving posts by their date and category
- Get latest post from categories
- How to create a playlist for audio associated with posts per category
- Are post, page and category IDs unique to each other?
- Change the background of each post according to the category
- Static pages not working
- Post-Archive like a page in a specific subdirectory
- Programmatically add posts from specific category to menu
- WP_Query of Category Not Showing First Post
- Post is in descendant category not working in home.php
- WordPress displays post on subcategory only
- How to get posts ordered by using their categories?
- Remove Featured Image from posts in specific category?
- How to show a featured image inside a post in only 1 single category
- Hide parts of the post content after typing it’s name or searching it by category
- SQL Bulk Move old posts by one author to another category
- How to display only one category in a custom post type?
- load more posts by category
- Get post category as a separate string and url
- Get only X number of categories
- Display Related Posts by Category in Random
- inserting a category into post
- Getting posts from some categories plus some individual posts
- Change layout of post depending on category
- How to make posts being uncategorized
- How to display a single(current) post from a category
- Sidebar limiting to 10 posts?
- posts going to 2 pages/categories only show up in 1
- displaying the categories post
- How to show beneath posts the full category path?
- What’s a theme that properly handles previews of different types of posts?
- Display Parent Category of a Post belonging only to Subcategory
- How to view all posts (on site, not admin) that are uncategorized?
- How to create a list of links to post with specific category
- How to list post as buch of category, and all of them
- latest post showing up twice on posts page
- wp_list_categories() Exclude All Categories Except One
- How can I add a page that shows posts from a single category?
- Highlighting Current Category in the Archive and Feeds page
- Categories Listing and Highlighting current category item
- Get current taxonomy and display query accordingly
- Can I style single post that are in multiple catergories?
- Geting error in post and category [closed]
- Different post views for different category views
- Display most recent posts in category with Twenty Ten theme widget
- Possible?! A contextually titled back link
- How to add content above footer in posts from specific category
- Rewriting blog permalinks
- Display hierarchical categories/sub-categories for a single post only
- Display Current Posts Category (with the most posts)?
- Allow / show post comments in category pages
- Display a specific category in a focused area of my site
- Post in bulk based on category template
- How to select a category automatically based on a word in WordPress post title?
- How to make ajax load posts from the current category?
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Remove subcategory slug from url
- Display default matabox of posts(add category) wordpress
- Can I show category name in url for only one of my categories?
- Automatic duplicate/copy of post to a related page in WordPress
- Post meta not working
- How display related post only in Default category on single
- ACF date picker to trigger category change
- get category in list of posts // shortcode for custom related posts
- Is there a way to categorize a list posts all at once?
- Get category slug of the Parent category of a Product
- How to get tags when using publish_post
- Yoast breadcrumb URL shows category instead of the page
- Show single post child category from a determined parent
- Author post count in category
- How can I create a ‘sub-blog’ which has its own sidebar on individual posts?
- Featured Story Shortcode not outputting content
- I want to add the 10 most recent posts under a parent category on the main menu
- How to add class to specific navbar item when post parent category is in specific category
- exclude particular category in api
- On the online version of my blog posts disappear
- How to Create another Page Category like the “Post” and “Pages”
- Current post categories and subcatecories outside of the loop
- How do you change the permalink for posts for a single category?
- Query prints posts without specific categories
- Foreach issue in get_posts function
- Posts are not displaying on their category and tag page
- Make categories appear random
- how to filter posts by category without page load (ajax) in wordpress?
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- How to increase the number posts that displays by a hierarchical taxonomy? (HTTP ERROR 500)
- How to add a ‘News’ section to specific posts in WordPress
- how to create a category with wp_insert_post and post_category
- Get Category in save_post Hook
- How to 301 redirect from url with post id to permalink with post name (slug)?
- Create/Set Category as Title of Post
- How to distinguish pages created by woocommerce?