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

    Hi everyone,

    I would like to know how I can sort my porfolio entries.

    By default it is the older entry in first and after the second etc…

    I want to show, in first, my most recent post and the second recent entry etc…

    Have you got any idea to do that ?

    Thank your very much for your help !

    Regards,

    Thibault

    #103144

    Hi Thibault,

    Try adding the following to your functions.php file at the very bottom:

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

    Regards,

    Devin

    #103145

    Thank you for your answer Devin !

    I’ll try it tonight :)

    Regard,

    Thibault

    #103146

    Let us know if that doesn’t work for you.

    Regards,

    Devin

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

The topic ‘Just a quick little question :)’ is closed to new replies.