You need to use this to parameters orderby
and order
<?php query_posts( array( 'category_name' => 'my_category_slug', 'orderby' => 'ID', 'order' => 'DESC', 'posts_per_page' => -1 ) ); ?>
Related Posts:
- Get posts from sites in Multisite?
- How to show all posts of the category in wordpress?
- How to show related posts by category
- How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling
- Display all posts from specific categories on a page
- Using categories & “stickyness” together
- Does the ‘cat’ argument in query_posts fetch posts from subcategories as well as the given ID?
- List posts by category exclude current post
- Display only the latest post from multiple categories
- Query only Posts from Both of Two Category?
- Select category in custom query
- Display one latest post from multiple categories
- Return category slug / title from category ID
- Featured Posts for Category Pages
- Exclude category from loop not working
- “NOT ONLY IN” taxonomy query operator?
- show posts names and links in the sidebar list as categories child
- Cannot add / edit categories to a post anymore
- Filter Home Page Posts in Buddypress [closed]
- Check child/parent categories if exists
- Post count for category and tag
- Checking for two categories in query_posts
- How to query post like normal search would do. within search.php page
- Query Posts Exclude Entire Category
- Category Foreach keeps looping?
- how to query posts and auto assign category if post title has keyword
- How do I call posts with a certain tag?
- Modify WordPress SQL Query to pull from within a category
- query order by category
- Get link which associated with a specific category and tag
- Order by category titles
- Have parent category contain only one post?
- How to make multiple sections in home pulling posts category wise?
- List posts in alphabetical order
- Randomly load categories with latest post
- Set colors depending on category
- How do I query_posts in cat=1 AND not in cat=2
- List all posts in a category with query_post() function
- Exclude a category from a query that includes its parent category
- Show the latest post from child category?
- Pagination on category.php and tag.php not working
- Problem with different query loops (and “main loop”) on category template page!
- query_posts not reading correct categories
- Pagination for query_posts();
- Exclude category from related post
- Post belonging to many categories
- How to put page numbers with the next/previous on a post/category list?
- Categories will only display links to posts
- Posts from a category on homepage with category archieves page default css
- function query_posts disabling current_page_menu class
- All categories displays the same posts
- query_posts by category_name and custom taxonomy
- WordPress displays post on subcategory only
- How to get posts ordered by using their categories?
- wordpress taxonomy query posts
- PHP dynamical conditional post display
- Posts of specific category on page and excluded from index.htm
- new WP_Query issues
- Getting posts from some categories plus some individual posts
- how can i hide category?
- Displaying links to all posts of the same category on the post page
- Post not found when filtered by category ID
- Exclude categories from postquery
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- Show posts from category specified using a custom field
- query_post problem
- Add class to current post in query_post
- Is there any better/faster code than this ? It shows the categories that an author had ever posted in
- Different post slug based on archive
- How to display particular categorie’s post which associated to specific user?
- Pagination does not work with query_posts()
- Assign a class to first element in category in loop
- How to display products with multiple conditions, product_id and category_id
- Querying posts from current category, using a variable as array argument
- Need help writing loop to display posts by categories in separate divs
- Query post only from categories that have subcategories
- Query post category & remove any post id
- How to pass multiple checkbox values to wordpress query?
- Displaying posts by year
- Paginate WordPress Category Pages
- single.php fires more than once after clicking on any post to view with different post id each time
- How to have a category not show up in query post with page panigation?
- Query pages by category
- Showing one post from each category, paged?
- How to get child category list post in one template?
- Change from all posts to specific categories post on main page?
- Sort Posts Alphabetically Based on Specific Category (Divi)
- WordPress Multisite – global categories
- Can’t custom taxonomies have same terms (slugs) as categories?
- How only display all post related to category
- Add category to all post by using sql query?
- How to remove “Category : …”
- Multiple category selection in post, shows less important category in breadcrumb
- load more posts by category
- Only the most recent post is showing on my category page (working on localhost, not live site)
- add woocommerce archive description if exist
- Can’t display posts by filtering categories using isotope.js
- Is there a reason to put a product in both the Child and Parent Categories?
- No results found for second level category
- Categories in media library