WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
Sort archive page asc/desc using Custom Field (2 posts)

  1. wpwebdlr
    Member
    Posted 1 year ago #

    I am trying to create links for users to sort either ascending or descending based off a custom field. For example, I have numeric fields for number of bedrooms and number of bathrooms. I'm trying to make links at the top of the page so that the user can sort the listings by either of those two options.

    I've tried using the suggested WP post query string and have looked around the Types API codes but I'm not able to query any custom fields.

    Is there a certain way you should format your query for it to return the custom fields in either ascending or descending order? I've tried using meta_key without success. Also, I've tried meta_key with using the wpcf- prefix and also without it.

    http://wordpress.org/extend/plugins/types/

  2. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi wpwebdlr,

    Can you please share the query code you have used. Hope you are using WordPress 3.5.1 and Types 1.2.2

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic