Tagged: 

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

    Hi.

    Is possible to change default sorting portfolio items to “by date”?

    http://new.kufieta.pl/oferta/czystosc/

    http://new.kufieta.pl/oferta/czystosc/szczotki/

    Thank you in advance for your help

    Regards Adam

    #84344

    Hi.

    Is it possible your response?

    I looked in the file loop but do not know what to add or change.

    Regards

    Adam

    #84345

    Open up functions.php and add following code to the very bottom:

    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 );

    #84346

    Thank you, Dude.

    It works perfectly.

    Regards

    Adam

    #84347

    Glade Dude could help you!

    Regards,

    Mya

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

The topic ‘Default – sort by date portolio items’ is closed to new replies.