Tagged: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #12785

    Is it possible to change the order of the portfolio-items?

    It´s sorted in a descending chronological order, but it would be MUCH better if it was sorted in an ascending order. (So that the newest portfolios are at the top of the page… :) For me as a photographer it is way better to present the newest portfolios at the top of the page. :)

    (I hope you understand what I mean)

    Thx a lot for your answers!

    #76723

    I am having the same issue? Any help would be appreciated. Thanks

    #76724

    Open up includes/loop-portfolio.php and replace:

    if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }

    with:

    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['orderby'] = "date";
    $avia_config['new_query']['order'] = "DESC";
    query_posts($avia_config['new_query']);
    }

    #76725

    It works, thx a lot!

    The code you wanted me to replace was not exact the same, so for others: find the “new-query” in includes/loop-portfolio.php and replace this line by dudes solution.

    Thank you very much! That really makes the theme a lot better!

    #76726

    Hi!

    Glad that I could help you :)

    Regards,

    Peter

    #76727

    hi,

    i’ve tried your solution and it works but it creates another problem : all the categories that are hidden in a portfolio now appear in the sorting menu. Can you please think of a fix ?

    Cheers

    #76728

    Hi radugidei,

    Can you provide a link to your site so I can see what you are describing live and inspect the code a bit.

    Regards,

    Devin

    #76729

    devin, i have taken the solution down for the moment, but here’s the code part :

    the original code :

    if(isset($avia_config[0])) $includeArray = $avia_config[0];

    the proposed solution :

    if(isset($avia_config)) {

    $avia_config = “date”;

    $avia_config = “DESC”;

    query_posts($avia_config);

    }


    as you can see, the original code is different from what Dude suggested (which is the code from Angular if I’m not mistaken) and makes references to ‘tax_query’ and ‘terms’. can the previous solution be adapted to reflect this new codebase ?

    cheers

    #76730

    Try to replace:

    if(isset($avia_config['new_query']['tax_query'][0]['terms'])) $includeArray = $avia_config['new_query']['tax_query'][0]['terms'];

    with:

    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['orderby'] = "date";
    $avia_config['new_query']['order'] = "DESC";
    query_posts($avia_config['new_query']);
    }

    if(isset($avia_config['new_query']['tax_query'][0]['terms'])) $includeArray = $avia_config['new_query']['tax_query'][0]['terms'];

    The tax query and the order/orderby query parameter do not affect each other.

    #76731

    that works now, thanks Dude :)

    #76732

    Hi,

    Glad that this is resolved. :)

    Cheers,

    Ismael

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

The topic ‘Portfolio-Order -> can I change it?’ is closed to new replies.