-
AuthorPosts
-
June 14, 2017 at 10:44 am #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
June 14, 2017 at 7:56 pm #808180Hey 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,
VictoriaJune 15, 2017 at 9:08 am #808456User 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”
June 19, 2017 at 6:06 am #809651Hi,
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,
IsmaelJune 19, 2017 at 8:52 am #809679I don’t have WPEngine!!!
June 20, 2017 at 7:05 am #810206Hi,
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,
IsmaelJune 20, 2017 at 9:32 am #810245My site is hosted by “ARUBA” and ORDER BY RAND() is allow
June 21, 2017 at 8:00 am #810820Hi,
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,
IsmaelJune 21, 2017 at 8:51 am #810850I did it!!!
June 21, 2017 at 11:20 am #810899Hi,
Thanks for the feedback, I’m guessing that means you got it working?
Best regards,
RikardJune 21, 2017 at 2:38 pm #810971No I still waiting for the solution
June 21, 2017 at 2:43 pm #810973that 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
June 21, 2017 at 2:46 pm #810976Or 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');
June 22, 2017 at 7:06 am #811335Hi,
Thanks for helping out and sharing @guenni007. Did you try that out @ttnka?
Best regards,
RikardJune 22, 2017 at 3:05 pm #811577Hi, 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.
June 23, 2017 at 5:16 am #811943 -
AuthorPosts
- You must be logged in to reply to this topic.