Support › General › Orderings items from a "Post" custom field using WP_QueryResolved
I'm using a "Post" custom field with Cloneable and Sortable option.
In the back-end my client can reorder the items as he wants.
I would like to know how I can retrieve these items but with the same order as what I have inside my back-end CPT?
I'm using Oxygen (with the Advanced Query Builder) and I would like to know which option / parameter I need to use to query the items in the same order using WP_Query.
To get the posts in the same order as the backend, you can just follow the Template Usage to do https://docs.metabox.io/fields/post/#template-usage
In case of using Oxygen Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://support.metabox.io/topic/support-policy/
Oxygen Builder use the default WP_Query inside the Advanced Query Builder, my question is how to get the same order with a default WordPress WP_Query query?
The solution was found with the help of Phe Simmonds (support from Oxygen Builder).
We just needed to add "orderby": "post__in"
Like this: https://d.pr/i/PfSrVI
This thread can be closed and marked as [RESOLVED]
Hi Adrien, I have a similar issue and hope you can help?
I also have an advanced Query in Oxygen and I am trying to sort my posts by a custom field I added in Metabox.
I added a number field and have assigned a number to each post. In the query I have tried to do orderby --> data --> and choose the Metabox field but this doesn't work.
Any ideas would be hugely appreciated!