Orderby in an array

4

Friends, I'm trying to edit a array , so that it presents the information in ascending or descending order.

I'm doing the following:

$Recent_Page = get_post_meta(get_the_ID(), 'imic_home_recent_property_no', true);
query_posts(array('post_type'=>'property', 'post_status'=>'publish', 'orderby'=>'ID', 'order'=>'ASC','posts_per_page', =>$Recent_Page));

Nothing happens. What can I be wrong?

    
asked by anonymous 03.12.2015 / 19:47

1 answer

2

As wordpress codex example on query_post , follow below:

$Recent_Page = get_post_meta(get_the_ID(), 'imic_home_recent_property_no', true);

$args = array(
    'post_type'=> 'property',
    'post_status'=>'publish',
    'orderby'=>'ID',
    'order'    => 'ASC',
    'posts_per_page' =>$Recent_Page
);
query_posts($args);
    
03.12.2015 / 20:24