WordPress.org

Ready to get started?Download WordPress

Forums

ORDER List of posts by custom field value which is numeric (2 posts)

  1. lobas
    Member
    Posted 4 years ago #

    Hi,

    I have a E-commerce type of theme I'm making and I have a list of posts on my category page which have a custom field called price and the value is numeric.

    How can I sort/order the posts so the post with the lowest price is displayed first. and Vice versa Lowest - Highest, Highest - Lowest

    Its a custom field meta key is price value is numeric, ive looked on the support forums and found nothing to sort the posts, ive also looked at a plugin wp-sort which wasnt any help

  2. MichaelH
    Member
    Posted 4 years ago #

    http://wordpress.org/support/topic/368175

    I believe that 3.0 will have a fix so you won't have to depend on a 'hack' to sort numeric custom fields properly.

Topic Closed

This topic has been closed to new replies.

About this Topic