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?
![post grid timeout on shared server? 1 post grid timeout on shared server? 1](https://pickplugins.com/wp-content/litespeed/avatar/1d6aebdfa2525a63635355a810daebb9.jpg?ver=1738576747)
![post grid timeout on shared server? 3 post grid timeout on shared server? 3](https://pickplugins.com/wp-content/litespeed/avatar/978ff02cf6cfb3e60ade623dd6942a3a.jpg?ver=1738285744)
![post grid timeout on shared server? 4 post grid timeout on shared server? 4](https://pickplugins.com/wp-content/litespeed/avatar/60b037d2fe05ceb39acb7f02dbd29bd8.jpg?ver=1738285093)
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
Glad to see you figured it out.
Regards