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

    Hi,

    I find few posts on a forum about “random order” but it doesn’t help me.

    I’m using this code:


    function loop_portfolio_query( $location )

    {

    if ( $location == ‘loop-portfolio’ )

    {

    global $avia_config;

    if(isset($avia_config)) {

    $avia_config = “rand”;

    query_posts($avia_config);

    }

    }

    }

    add_action( ‘avia_action_query_check’ , ‘loop_portfolio_query’, 10, 1 );


    In Portfolio Page it’s work fine!!! but it also affect the Front Page “Latest Portfolio” and it mixing it up!!! And I dont need it.

    Portfolio Page – http://andreibart.com/showcase-video/love-stories/

    Front-Page – http://andreibart.com/

    Please Help me

    Regards,

    Andrei

    #98620

    Hi,

    Try to replace it with

    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'] = "rand";
    query_posts($avia_config['new_query']);
    }
    }
    }
    add_action( 'avia_action_query_check' , 'loop_portfolio_query', 10, 1 );

    Regards,

    Ismael

    #98621

    Done!!! Great!

    Thank You, Ismael!

    #98622

    Glad Ismael could help :)

    Regards,

    Devin

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

The topic ‘PORTFOLIO SORT ORDER – RANDOM’ is closed to new replies.