WordPress.org

Ready to get started?Download WordPress

Forums

Custom query orders posts improperly (2 posts)

  1. thenameisnick
    Member
    Posted 4 years ago #

    I have a custom query that sorts my a numeric meta_value in DESC order.

    The problem is that it seems to be ordering based on the first digit of a number first and then second etc.

    For example, a numeric value of 3 is ranked greater than a numeric value of 29.

    Any suggestions?

  2. mrkingid
    Member
    Posted 4 years ago #

    you need to input custom variable with an added 0.

    eg:

    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    .
    .
    etc

Topic Closed

This topic has been closed to new replies.

About this Topic