How to order Wordpress Posts using a Custom Field value

Last updated on: July 6, 2026 1:01 am

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

Need to sort WordPress posts by a custom field instead of the default publish date? Maybe you’re organizing events by start date, products by price, or portfolio pieces by priority. Normally, that means writing a pre_get_posts hook, setting orderby to meta_value (or meta_value_num for numbers), and pointing it at the right meta_key inside a WP_Query — get any of that wrong, and the whole listing breaks.

The Advanced Post Types Order plugin skips all of that. With a simple point-and-click interface, you can sort WordPress posts by any custom field value in a few clicks — no code, no template edits, no risk of a broken query. Just choose your options, and the plugin handles the sorting for you, in real time.

Step-by-Step: How to Sort WordPress Posts by Custom Field Value

Here’s how to sort your WordPress posts by a custom field value:

  1. Access the Reorder Interface: Go to the Advanced Post Types Order screen for your custom post type. This is where you’ll configure how your posts are sorted.
  2. Select the Relevant Taxonomy: Choose the taxonomy that applies to the posts you want to sort. In this example, we’ll use “Categories.” Once selected, pick the specific term — for instance, a category called “Blog.”
  1. Enable Automatic Ordering by Custom Field: Choose the Automatic Order option, then select Custom Field from the list of available sorting methods. This tells the plugin to sort your posts by a custom field value instead of manual drag-and-drop order.
  2. Specify the Custom Field Name: Enter the exact custom field name (its post meta key) that you want to sort by. This must match the custom field key saved on your posts — if you’re using Advanced Custom Fields (ACF) or a similar plugin, remember this is the field’s name, not its display label.advanced-post-types-order-custom-field-usage
  1. Apply the Changes: Click Update. The plugin immediately sorts your posts by the custom field values you specified.

And that’s it — your posts are now sorted by custom field value, giving you full control over how your content displays, with no code involved.

How WordPress Normally Sorts Posts by Custom Field

Without a plugin, sorting posts by a custom field usually requires creating or modifying a custom WP_Query.

For example:

$args = array(
    'post_type'  => 'post',
    'meta_key'   => 'priority',
    'orderby'    => 'meta_value_num',
    'order'      => 'ASC'
);

This approach works well for developers but requires editing theme files or custom templates.

The Advanced Post Types Order plugin applies the same type of ordering automatically through an intuitive interface, eliminating the need to modify PHP code.

Why Sort WordPress Posts by Custom Field with Advanced Post Types Order

Sorting by custom field through Advanced Post Types Order comes with a few clear advantages:

  • No-Code Sorting: A visual, user-friendly interface handles the technical work — no functions.php edits or WP_Query arguments required.
  • Sort by Any Custom Field: Order posts using any custom field or post meta value — dates, prices, ratings, or your own custom data — for complete control over how content is organized.
  • Real-Time Updates: Once you save your settings, the new sort order applies immediately, with no manual adjustments or extra code needed.
  • Broad Compatibility: Works with default posts, pages, and any custom post type — hierarchical or not — and plays well alongside other WordPress plugins and themes.

Whether you’re sorting blog posts, products, or any custom post type, Advanced Post Types Order gives you a fast, code-free way to sort WordPress posts by custom field value and keep that order exactly how you want it.

Frequently Asked Questions

Does this work with any post type, or only default WordPress posts? Any WordPress post type — default posts and pages, or a custom post type — whether it’s hierarchical or not.

Can I sort by a custom field created with Advanced Custom Fields (ACF)? Yes. Since ACF, like virtually every custom fields plugin, stores its data as standard post meta, you can sort by it the same way. Just enter the field’s actual meta key/name, not its display label.

Do I still need orderby => meta_value in my theme’s queries? No — that’s exactly what the plugin avoids for you. If you have a separate custom query elsewhere on your site (in a template file, for instance), just make sure it includes 'orderby' => 'menu_order' so it respects the sort order you’ve set here.

Where do newly published posts land in the sort order? That’s controlled by a setting in the plugin’s sort list options, so you can choose whether new posts join the top or the bottom of the list.