As a website grows, the website owners have to make specific decisions to push it to the next level, and choosing the correct promotion approach is pivotal.
Rearranging WordPress posts is another common method for ensuring that the right post is served to the right audience.
In this article, we will explore how to reorder posts in WordPress easily. By default, WordPress enables all the posts in reverse chronological order, which means the most recent post appears on the website and WordPress dashboard too.
However, it is pretty easy to reorder WordPress posts in a specific desired order. Also, learn how to make WordPress sites private easily.
However, WordPress manages all the posts and pages in reverse chronological order, but there are a few methods to reorder WordPress posts and display specific posts on the front page.
Some prevalent methods include altering the publication date of posts, using reorder plugins, inserting reorder HTML code in PHP, etc. Let’s discuss all the methods to reorder posts in WordPress.
The easiest method to reorder WordPress posts is to change the post published date. As you may be aware, the most recently published post appears first; thus, if you update a post’s date, its position will change.
Suppose you intended to resurrect an older post; for instance, you’d have to update the date. For more clarification, implement the following steps:
Don’t freak with coding! It gonna be quite straightforward. Because of a tiny snippet of code on the theme, WordPress puts all of the content in reverse chronological order. To reorder posts in WordPress, simply change the PHP code in the theme.
$query->set( 'order', 'DESC' );
function wpb_custom_query( $query ) { if( $query->is_main_query() && ! is_admin() && $query->is_home() ) { $query->set( 'orderby', 'date' ); $query->set( 'order', 'ASC' ); } } add_action( 'pre_get_posts', 'wpb_custom_query' );
function wpb_custom_query( $query ) { if( $query->is_main_query() && ! is_admin() && $query->is_home() ) { $query->set( 'orderby', 'rand' ); } } add_action( 'pre_get_posts', 'wpb_custom_query' );
Remember, to make any order other than DESC and ASC; you have to replace the order string with an orderby string, as illustrated in the above snippet. In this way, just by copying and pasting, you can reorder your WordPress posts.
Plugins simplify and automate any task, requiring essentially no effort from the user to execute the same activity. If you don’t want to mess around with updating postdates or inserting PHP codes, this approach is excellent for you.
By using plugins, you just have to perform the drag and drop to reorder the posts. Though there are several plugins to reorder WordPress posts yet the simplest plugin is Post Types Order which you can download from the plugin directory.
Most users are familiar with this feature, which allows you to make any WordPress post a featured post. The sticky posts function is a WordPress default function that enables you to showcase a specific post above all others on your blog or website.
Remember, this is not actually a reordering posts method, but it is an extremely useful tool to promote any specific (or sometimes trending post) on your main page or at the top of the blog.
Apart from quick editing, the sticky post option also appears on the editor of WordPress under Publish section; however, it depends on the theme you are using.
It is all about how to reorder posts in WordPress with 4 different methods; changing publish date, altering functions.PHP code, reordering plugins, and creating a post sticky. As you’ve seen, if applied correctly, these techniques are pretty simple.
As a site expands, it’s crucial to reorder WordPress posts since you need to show off your skills in order for visitors to trust your content. I hope this post helps you to reorder posts on WordPress website easily. Furthermore, any queries and suggestions are most welcome.
It is pretty annoying when you scroll down Reddit and see 'delete posts' or 'deleted…
Do you know how to take a screenshot on Mac? Screenshot helps you save a…
Are you looking for how to upload pdfs to WordPress? Then stay connected with this…
Are you looking for how to hide internet activity from a router? Then you have…
Everyone uses the Internet though no one owns the Internet as we discussed in this…
Do you want to learn what is a static page in WordPress? If you just…