Support reply may delay for 3 weeks due to corona virus outbreak, please send us email to support@pickplugins.com
Ticket for: Post Grid
0
Val
Mar 07, 2019 11:30 PM 1 Answers
Member Since Feb 2019
Subscribed Subscribe Not subscribe
Flag(0)

Hi - I have a site that I use post grid on and when I added the shortcode to more posts, my site wouldn't allow me to log in anymore. I asked Siteground (my host) what the problem was and they told me "It seems that the script exceeds the timeout limit on the server thus it results in the experienced error." - I have a shared server and I don't want to change that but I would love to use the post grid plugin on most of my posts as it's a great way to post related content. Is there any way to reduce the weight on the server while still using Post Grid?

2 Subscribers
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
PickPlugins
Mar 08, 2019
Flag(0)

Welcome to our forum.

I probably understand the issue, if you are displaying post grid for a related post on single post page you will need to exclude the current post from the loop. please Add following code under theme functions.php file

function post_grid_filter_query_args_extra($query_args){
    
  $current_post_id = get_the_ID();
  $extra_query = array (
      'post__not_in' => array($current_post_id),
      );
  return array_merge($query_args, $extra_query);
  }
add_filter('post_grid_filter_query_args','post_grid_filter_query_args_extra');

And let me know the result.

Regards

PickPlugins
- Mar 12, 2019 09:30 AM
Flag (0)
0

Glad to see you figured it out.
Regards

Val
- Mar 12, 2019 09:11 AM
Flag (0)
0

actually I just figured it out – I have to make the posts show in descending versus ascending order – that's what was causing the error message to show in the post

5+ more comments. Sign in to Reply
Replying as Submit