Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #807897

    I use portfolio grid 1 column 1 entry and I have to show only one random item for page load , I choose the order ‘random’ from options list, but the item is always the same. I exclude pagination option, and I try insert new filter in my child them functions.php, but the result is always the same.

    How have to do for show 1 random item? thanks

    #808180

    Hey ttnka,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
    Best regards,
    Victoria

    #808456

    User and password in private content, the portfolio grid is in home page, the box under the shoes with the face and the title “Andrea Tosi”

    #809651

    Hi,

    Is the site hosted on wpengine? Please refer to this link for a possible fix.

    // https://wpexplorer-themes.com/total/docs/random-order-wpengine/

    Best regards,
    Ismael

    #809679

    I don’t have WPEngine!!!

    #810206

    Hi,

    I see. Thank you for the info. Where do you host the site? Please ask your hosting provider if they allow “ORDER BY RAND()” in the MySQL queries.

    Best regards,
    Ismael

    #810245

    My site is hosted by “ARUBA” and ORDER BY RAND() is allow

    #810820

    Hi,

    Please install the following plugin then set the user account to administrator.

    // https://wordpress.org/plugins/query-monitor/

    We’ll check it again afterwards.

    Best regards,
    Ismael

    #810850

    I did it!!!

    #810899

    Hi,

    Thanks for the feedback, I’m guessing that means you got it working?

    Best regards,
    Rikard

    #810971

    No I still waiting for the solution

    #810973

    that snippet here: Link gives you the oportunity to set up on alb element the sort option BUT!

    read the warning on random option on the bottom:

    [alert style=”danger”]Attention – if you use the “Random” sort option do not use it in combination with the “pagination” setting. Otherwise you risk that the user just sees the same posts over and over again because wordpress doesn’t know which posts were used on the other pages.[/alert]

    but if you only want to show 1 Item – pagination makes no sense

    #810976

    Or try this in documentation: http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/

    function custom_post_grid_query($query)
    {
    	$query['orderby'] = 'rand';
    	return $query;
    }
    add_filter('avia_post_grid_query','custom_post_grid_query');
    #811335

    Hi,

    Thanks for helping out and sharing @guenni007. Did you try that out @ttnka?

    Best regards,
    Rikard

    #811577

    Hi, I found the problem I have install “Post Type Order” plugin and this plugin modify all the order by WP default. That’s is the problem.

    Thanks.

    #811943

    Hi,

    Great, glad you found the problem and thanks for letting us know. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.