Also in the Loop I have a Basic text element to display the post name and orderfield.
In this case the loop displays nothing, its just blank.
If I remove the value in Order meta key then the loop displays all my posts but they are not ordered, well ordered by creation date.
After seeing a similar report for Metabox fields I tried changing the ACPT orderfield to a text value and updated all the posts to use values such as 01, 02 etc. But this gives identical results. ( How to:
Custom Post Order Query Loop / Metabox )
So a couple of points:
How should the Order by actually work? When it says Meta numeric value then I’d assume it should require a numeric field.
Is this a bug with the ACPT integration or am I doing something wrong?
The intention is to be able to sort the custom posts using a numeric value ( actually a magazine issue number ). I don’t want to have to use the 01, 02 format as I can’t rely on my customer actually remembering to use that format ( there may be over 100 issues ).
Hard to tell without having a look at the actual site / setup. Please send some temporary credentials to help@bricksbuilder.io and include a link to this forum thread. Then I’m happy to have a look.
Andre,
Thanks. This is just a test local setup so I’ll try and create an external version.
But really simple setup. Just some sample posts and the query loop as above.
I had tried using the cf_testcpt1metabox_orderfieldnumeric and as suggested elsewhere just the orderfieldnumeric. So other than checking in the database is there an easy way to tell what field name should be used?
I’ll ask Mauro if it is possible to highlight the actual fieldname to be used on the ACPT pages.
Hey @alanj I am having the same problem, how did you solve finding the correct meta key to sort the custom post type? I have custom posts that I want to sort by the custom date field.