How to Customize WordPress Post Order?

WordPress is the most popular blogging platform for bloggers. This post will show you how to change the order of posts and pages in WordPress themes. Here are a few ways you can customize the sorting order of your posts in WordPress.

Customize WordPress Post Order Manually

Open your theme and enter the following code to customize the post order manually:

// display posts organized by title in ascending order

This code will display a specified number of posts, in ascending order according to the post title. This code can be customized in many ways to suit your needs.

Another useful trick is to customize the order of categories, such as in an archive directory or service directory. Replace the first line in the loop example above with the following:

<?php if (is_category()) { $posts = query_posts( $query_string . '&orderby=title&order=asc' ); } ?>

You can also add another endif to the loop as follows:

<?php endif; ?>
<?php endif; ?>

You can also replace is_category() with the is_whatever() statements of your choice.

  • is_home()
  • is_single()
  • is_author()
  • is_search()
  • is_archive()

For more information, visit the WordPress Codex.

Plugins to customize post order automatically

We’ll look at some simpler custom sorting methods using WordPress plugins.

1. Custom Query string Reloaded for WordPress

Custom Query Reloaded is a popular WordPress plugin. CQS (Custom Query String) offers an Admin Options Panel where users can specify as many custom post queries as they wish. CQS allows for custom sorting.

2. Smart Sort WordPress Plugin: Sort posts by Custom Field

This plugin lets you place a sorting bar with the option to sort posts based on any custom field. The sort bar can be placed above or below the list of posts within a category, archive or anywhere else in your template.

3. aStickyPostOrderER – Plugin to Change the WordPress Post Order

This plugin can help you reorder the posts that WordPress displays.
aStickyPostOrderER allows you to customize the order in which posts appear on a WordPress blog, based on categories or tags. This is useful for WordPress to be used as a Content Management System. ).

4. WP-Snap! WordPress Plugin

WP-SNAP! WordPress Plugin that creates alphabetical listing ABCDEF etc. Links on a template file. Clicking “A”, “D”, and “Z” will display all post titles beginning with the letter you selected.

5. Sort category posts by title

This plugin appears to be a simple and quick way to sort category posts alphabetically in ascending order based on the post title. The plugin’s home page states that “WordPress sort category posts by title” was created for WordPress 2.0.2. It only changes the order of the posts in category view. This will not affect the ordering of the posts on other pages (e.g. the homepage) of the site. This plugin’s code is clean and simple. It just begs to be explored and adapted.

Disclosure: Some of the links in this article are affiliate links and we may earn a small commission if you make a purchase, which helps us to keep delivering quality content to you. Here is our disclosure policy.

Noor Mustafa Raza
Noor Mustafa Raza
I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

spot_img

Related Articles

Why WordPress Is The Best CMS? (And, Possible Alternatives)

Why WordPress is the best CMS? Having a website has become a necessity for both individuals and businesses. Content Management...
Read More
When optimizing the speed of your WordPress site, you might come across a performance metric known as Time to First...
Are you dealing with a broken WordPress site and don't know what to do? If your website is showing a...