Reply To: sort mashup pois by custom field

Home Forums MapPress Support sort mashup pois by custom field Reply To: sort mashup pois by custom field

#17438
Chris
Keymaster

The easiest way to do this is using the query itself. You may specify a custom field name and then use that field to order the results:

[mashup query="post_type=any&meta_key=myfield&orderby=meta_value&order=asc"]

Note that only one field is supported.

The documentation for WordPress ‘wp_query’ has more details – different ordering types, changing the order (ascending/descending) or sorting by numbers instead of characters:

https://codex.wordpress.org/Class_Reference/WP_Query