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. Create a Filter to Find Hotels by Location
  3. Create an OTA Website Like Booking.com with Meta Box Plugin - P1: Create a Page to Introduce Hotel Rooms
  4. Create an OTA Website Like Booking.com with Meta Box Plugin - P2: Create Filters on the Archive Page
  5. Create an OTA Website Like Booking.com with Meta Box Plugin - P3: Create Filters for Single Hotel Pages
  6. Create Dynamic Favicon in WordPress using Meta Box plugin
  7. Create Posts Series in WordPress Using Meta Box
  8. Display a User List On the Frontend with Meta Box
  9. Display The Latest Products Section - P2 - Using Meta Box and Elementor
  10. Display The Latest Products Section - P3 - Using Meta Box And Oxygen
  11. How to Add Custom Fields to Display Banners using Meta Box Plugin
  12. How to Add Guest Author in WordPress using Meta Box (Part 1)
  13. How to Add Guest Author in WordPress using Meta Box (Part 2)
  14. How to Add Related Posts to WordPress Using Meta Box
  15. How to Build a Hotel Booking Website Using Meta Box - P1
  16. How to Build a Hotel Booking Website Using Meta Box - P2 - Booking Page in Backend
  17. How to Build a Hotel Booking Website Using Meta Box - P4 - Booking Management Page
  18. How to Build a Hotel Booking Website Using Meta Box – P3 – Booking Page for Customer
  19. How to Create a Classified Ads Website using Meta Box
  20. How to Create a Product Page - P2 - Using Meta Box and Oxygen
  21. How to Create a Product Page - P3 - Using Meta Box and Bricks
  22. How to Create a Product Page - P4 - Using Meta Box and Elementor
  23. How to Create a Product Page - P5 - Using Meta Box and Gutenberg
  24. How to Create a Product Page using Meta Box Plugin
  25. How to Create a Recipe - P2 - Using Meta Box and Oxygen
  26. How to Create a Recipe - P3 - Using Meta Box and Elementor
  27. How to Create a Recipe - P4 - Using Meta Box and Bricks
  28. How to Create a Recipe - P5 - Using Meta Box and Zion
  29. How to Create a Recipe - P6 - Using Meta Box and Brizy
  30. How to Create a Recipe - P7 - Using Meta Box and Breakdance
  31. How to Create a Recipe with Meta Box Plugin
  32. How to Create a Simple Listing - P2 - Using Meta Box and Bricks
  33. How to Create a Team Members Page - P1- Using Meta Box and Elementor
  34. How to Create a Team Members Page - P2 - Using Meta Box and Oxygen
  35. How to Create a Team Members Page - P3 - Using Meta Box and Bricks
  36. How to Create a Team Members Page - P4 - Just Meta Box
  37. How to Create a Team Members Page - P6 - using Meta Box and Breakdance
  38. How to Create a Video Gallery Page Using Meta Box + Oxygen
  39. How to Create ACF Flexible Content Field with Meta Box
  40. How to Create an Auto-Updated Cheat Sheet in WordPress
  41. How to Create an FAQs Page - P1 - Using Meta Box and Elementor
  42. How to create an FAQs page - P2 - Using Meta Box and Oxygen
  43. How to Create an FAQs Page -P3- Using Meta Box
  44. How to Create Buttons with Dynamic Link using Custom Fields
  45. How to Create Category Thumbnails & Featured Images Using Custom Fields
  46. How to Create Download Buttons Using Custom Fields with Meta Box Plugin
  47. How to Create Menus for Restaurants - P1 - Using Meta Box and Elementor
  48. How to Create Menus for Restaurants - P2- Using Meta Box and Bricks
  49. How to Create Online Admission Form for School or University
  50. How to Create Online Reservation Form for Restaurants using Meta Box
  51. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  52. How to Display Images from Cloneable Fields - P1 - with Gutenberg
  53. How to Display Images from Cloneable Fields - P2 - with Oxygen
  54. How to Display Images from Cloneable Fields - P3 - with Elementor
  55. How to Display Images from Cloneable Fields - P4 - with Bricks
  56. How to Display Opening Hours for Restaurants - P1 - Using Meta Box + Gutenberg
  57. How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen
  58. How to Display Product Variations - P1 - Using Meta Box and Gutenberg
  59. How to Display Product Variations - P2 - Using Meta Box and Oxygen
  60. How to Display The Latest Products - P5 - Using Meta Box and Bricks
  61. How to Display the Latest Products - P6 - using Meta Box and Breakdance
  62. How to Display the Latest Products Section - P4 - Using Meta Box + Zion
  63. How to Display the Most Viewed Posts - P1 - using MB Views
  64. How to Display the Most Viewed Posts - P2 - using Meta Box and Oxygen
  65. How to Filter Posts by Custom Fields - P2 - using Meta Box and FacetWP
  66. How to Manually Reorder Posts with Meta Box
  67. How to Show Featured Restaurants on Homepage - P1 - Meta Box + Elementor + WP Grid Builder
  68. How to Show Posts with Specific Criteria - P1 - Using Meta Box and Bricks
  69. How to Show Posts with Specific Criteria - P2 - Using Meta Box and Oxygen
  70. How to Show the Featured Restaurants - P3 - using Meta Box and Oxygen
  71. How to Show the Featured Restaurants Section - P2 - Using Meta Box and Bricks
  72. How to Use Custom HTML Field to Output Beautiful Texts or Output Custom CSS

Leave a Reply

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