Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15748

    Changing the order of the portfolio to descending. The topics are in ascending order and want you to be the most recent first.

    #88853

    Hi,

    Open includes > helper-template-logic.php and find this code

    //if we find categories perform complex query, otherwise simple one
    if(isset($terms[0]) && !empty($terms[0]) && !is_null($terms[0]) && $terms[0] != "null")
    {
    $avia_config['new_query'] = array( 'orderby' => 'ID',
    'order' => 'ASC',
    'paged' => get_query_var( 'paged' ),
    'posts_per_page' => $itemcount,
    'tax_query' => array( array( 'taxonomy' => 'portfolio_entries',
    'field' => 'id',
    'terms' => $terms,
    'operator' => 'IN')));
    }
    else
    {
    $avia_config['new_query'] = array( 'paged' => get_query_var( 'paged' ),
    'posts_per_page' => $itemcount,
    'post_type' => 'portfolio');
    }

    Change ‘order’ => ‘ASC’, to DESC. You should also add the parameter on the else statement if you don’t have any category. For reference you can look at this http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters.

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Changing the order of the portfolio to descending’ is closed to new replies.