Trying to filter pages to children of page, order by meta_value_num (ACF field)
-
Hello, I am trying to use the plugin to create a custom query that shows pages (post_type=page) which are children of page X, then order them manually. So, I created a new ACF field (type=number) and set that field group to show in the Rest API. I assigned some values to a few of the pages involved in order to test.
Under the query block’s Post Order section, I have set my query to order by ‘meta value num’ and ASC. Then as suggested, under Post Meta Query I set the meta key to ‘page_order’, value to 0 (zero), and compare to !=. Oddly, when I start typing ‘page_order’ under meta key, this meta key’s name doesn’t pop up in the suggestions, making me think that the plugin can’t see it even though I have ACF set to show this field group in the Rest API (maybe this points to the issue).
This sorting by meta key doesn’t seem to work, either in the block editor’s display or on the front-end page. It seems to sort them according to whatever the ‘order by’ select menu is set to (which is either by date or title), without regard for what I have set down in the meta query settings.
Any help is much appreciated. Thanks!
- The topic ‘Trying to filter pages to children of page, order by meta_value_num (ACF field)’ is closed to new replies.