Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15588

    How do I order the portfolio be descending, the most recent appearing first in the categories.

    #88104

    Add following code to the button of functions.php:

    function loop_portfolio_query( $location )
    {
    if ( $location == 'loop-portfolio' )
    {
    global $avia_config;
    if(isset($avia_config['new_query'])) {
    $avia_config['new_query']['orderby'] = "date";
    $avia_config['new_query']['order'] = "DESC";
    query_posts($avia_config['new_query']);
    }
    }
    }
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );

    #88105

    Hi, isn’t there a more intuitive way of managing what order the portfolio lists? I guess you’ll loose this fix after an upgrade of the theme?

    #88106

    You could add this function to your child theme functions.php – in this case you won’t loose the fix. In addition updates to functions.php are seldom and you can use ftp to update the other theme files without overwriting functions.php.

    #88107

    Thanks, It works well now. I put the code into the functions-eunoia.php.

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

The topic ‘Order Portfolio’ is closed to new replies.