Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17285

    Hello,

    I am wondering if it is possible (or something I have done incorrectly) to sort my portfolio with the newest item showing first in all places. As far as I can tell it is putting the oldest post at the end. I believe that would be the standard WordPress approach. Is this a setting or line of code somewhere?

    Thanks in advance!

    Scott

    http://www.scottnewlands.com

    #94849

    Hi,

    add following code to the bottom 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 );

    If this code doesn’t help you try to replace DESC with ASC

    #94850

    Thank you so much! That worked perfectly.

    #94851

    Glad Dude could help :)

    Let us know if you have any other questions or issues.

    Regards,

    Devin

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

The topic ‘Portfolio Sort Order – reverse chronological’ is closed to new replies.