Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter aseroh

    (@aseroh)

    Thanks for the reply.

    I tried it but it’s not working but I think there something missing or wrong in my code.

    Let use the code from the link i gave.
    This is the meta value
    a:6:{s:5:"width";s:3:"580";s:6:"price";s:3:"99"

    So the code is

    global $query_string;
    parse_str( $query_string, $my_query );
    $my_query['meta_query'] = array(
        array(
             'key' => 'price',
             'value' => 0,
             'type' => 'SIGNED',
             'compare' => '>=',
        )
    );
    $my_query['orderby'] = '3';
    $my_query['order'] = 'ASC';
    query_posts( $my_query );

    Actually I’m sure if the code below is right.

    $my_query['orderby'] = '3';

    No – $my_query['orderby'] = '3'; is not right. See http://codex.wordpress.org/Function_Reference/WP_Query

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘order by serialized meta value’ is closed to new replies.