Arranging posts in a custom order will be much easier if you use Meta Box plugin and the two extensions Meta Box Builder and MB Admin Columns. Compared to arranging posts by modifying the published date, which is time-consuming, Meta Box plugin and these extensions will do it more quickly in a blink of an eye for you.

First, you need to download the Meta Box plugin here. Besides the free plugin providing the framework to create custom fields, you might need to buy Meta Box Builder. It helps you create custom fields easily with intuitive UI. Or you can use a free online tool called Online Generator. If you’re a coder, you can code yourself and don't need these tools.

Additionally, you should use MB Admin Columns extension to manage the posts and view the order more easily in the WordPress admin.

After installing and activating these plugins, follow these steps below to manually reorder posts with Meta Box.

Step 1: Create a custom field to enter the ordinal number for posts

Meta Box Builder can help you easily create custom fields without touching any line of code. In the Dashboard, go to Meta Box > Custom Fields, click Add New button to create a new field group.

As we create a field to enter the number, you can choose Text field or Number by click Add New button here. Then, a new column on the right will appear to let you fill in the Title and Label of the field.

Create a custom field to enter the ordinal number for posts

I named this field Order field to easily identify it. Now, look at the field’s ID that I marked, you can use the automatically generated ID by Meta Box builder or replace it with your own ID for easy memorizing. After that, copy this ID to paste to the code in the next step. To finish this step, click Publish.

Fill in the ID for the order field

Step 2: Enter the custom ordinal number for posts

After creating the custom field, move to Post Editor, open a post that you want to reorder, and find the created field tab. In this tab, enter the number that you want this post to display and Updated the article.

Updated the article

To easily manage the order of posts, MB Admin Columns will help you create an ordinal column in the post list.

What you need to do is coming back to the Meta Box Builder. In the created custom field, choose Advanced > Custom settings, click Add New and enter these parameters:

Add Custom settings in Meta Box Builder

You must use admin_columns to integrate with MB Admin Columns. And after date is the position to display the ordinal column so you can replace it with after tag, after category or any position as desire. Finally, don’t forget to click Update.

If you use code, simply add this code when you create meta box.

‘admin_columns’ => ‘after date’

Now when you go to the post list, you will see a new column displaying the value of the custom field we entered before. That’s so convenient to control and manage the post order, right? However, this extension is not compulsory so it’s optional to use it.

Enter the custom ordinal number for posts

Step 3: Reorder posts on the front end

Your homepage still doesn’t display the post in the created order above unless you add these code to the ‘functions.php’ file of your theme.

function memory_custom_post_order_sort( $query ) {
    if ( $query->is_main_query() && is_home() ) {
        $query->set( 'orderby', 'meta_value' );
        $query->set( 'meta_key', 'mb_order' );
        $query->set( 'order', 'ASC' );
add_action( 'pre_get_posts', 'memory_custom_post_order_sort' );
  • 'pre_get_posts': the hook that fires just before the post query is created
  • is_home(): ensure that the reordering happens on the homepage only.
  • query->set( 'orderby', 'meta_value' );
    $query->set( 'meta_key', 'mb_order' );
    $query->set( 'order', 'ASC' );
    These 3 lines arrange your posts in ascending order according to the value of the field with id 'mb_order'. Replace ‘mb_order’ with your field ID if you use another ID.
    ‘ASC’: display your post in ascending order.

After saving the code, go to your homepage to see the result. You see, your posts are reordered as you want.

Final thought

Instead of changing the published date to organize your posts, now, you just need a few simple steps with the help of the Meta Box plugin and the Meta Box Builder extension. Even if you are not a coding expert, the above steps are not difficult for you, right?

Other case studies you might be interested in

  1. Create A Dynamic Landing Page in WordPress Using Custom Field
  2. How to Create ACF Flexible Content Field with Meta Box
  3. How to Create a Product Page using Meta Box Plugin
  4. How to Add Related Posts to WordPress Using Meta Box
  5. How to Create a Classified Ads Website using Meta Box
  6. Create Posts Series in WordPress Using Meta Box
  7. How to Add Guest Author in WordPress using Meta Box (Part 1)
  8. How to Add Guest Author in WordPress using Meta Box (Part 2)
  9. Create Dynamic Favicon in WordPress using Meta Box plugin
  10. How to Build a Hotel Booking Website Using Meta Box - P1
  11. How to Build a Hotel Booking Website Using Meta Box - P2 - Booking Page in Backend
  12. Create a Filter to Find Hotels by Location
  13. How to Build a Hotel Booking Website Using Meta Box – P3 – Booking Page for Customer
  14. How to Create an FAQs Page Using Meta Box
  15. How to Manually Reorder Posts with Meta Box
  16. How to Add Custom JavaScript Actions Using Button Field with Meta Box
  17. Display a User List On the Frontend with Meta Box
  18. How to Build a Hotel Booking Website Using Meta Box - P4 - Booking Management Page
  19. How to Filter Posts by Custom Fields and Custom Taxonomies on Archive Pages
  20. How to Use Custom HTML Field to Output Beautiful Texts or Output Custom CSS
  21. Create an OTA Website Like with Meta Box Plugin - P1: Create a Page to Introduce Hotel Rooms
  22. Create an OTA Website Like with Meta Box Plugin - P2: Create Filters on the Archive Page
  23. Create an OTA Website Like with Meta Box Plugin - P3: Create Filters for Single Hotel Pages
  24. How to Add Custom Fields to Display Banners using Meta Box Plugin
  25. How to Create Download Buttons Using Custom Fields with Meta Box Plugin
  26. How to Create a Recipe with Meta Box Plugin
  27. How to Create an Auto-Updated Cheat Sheet in WordPress
  28. How to Create Online Admission Form for School or University
  29. How to Create Online Reservation Form for Restaurants using Meta Box
  30. How to Create Buttons with Dynamic Link using Custom Fields
  31. How to Create Category Thumbnails & Featured Images Using Custom Fields
  32. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  33. Display The Latest Products Section - P2 - Using Meta Box and Elementor
  34. Display The Latest Products Section - P3 - Using Meta Box And Oxygen

Leave a Reply

Your email address will not be published. Required fields are marked *