sort mashup pois by custom field

Home Forums MapPress Support sort mashup pois by custom field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17436
    kamome
    Participant

    I am a MapPress Pro user. I appreciate high performance.

    I want to sort mashup pois by custom field.
    Because I want to control the overlapping order of pois icons freely.
    Please let me know what kind of short code to write.

    (I translated it into English by Google translation, I am sorry if it is hard to understand)

    kamome

    #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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.