[Resolved] Sort By Custom Field Value

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Sort By Custom Field Value

This topic contains 3 replies, has 2 voices, and was last updated by  Tom 8 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7796

    Clayton
    Participant

    Hey guys,

    I’m trying to make WP Show Posts sort by a custom field numerical value. Is that possible? I can create a custom field for the custom post type I’ve already created. I just need to be pointed in the right direction on the actual execution of sorting post lists by a custom fields value.

    Any help would be greatly appreciated!

    Running the latest version of GP Premium and WP Show Posts Beta.

    #7803

    Tom
    Keymaster

    Hi there,

    Try adding this to your shortcode:

    [wp_show_posts settings="meta_key=your_custom_field&orderby=meta_value_num&order=ASC"]

    Let me know 🙂

    #7840

    Clayton
    Participant

    Amazing! Worked like a charm. Thanks! Loving the continued development on WP Show Posts.

    #7843

    Tom
    Keymaster

    Awesome! Glad I could help 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.