[Plugin: Display Posts Shortcode] wp_reset_query() line in plugin was flaking my site out
-
Just an FYI, the call to wp_reset_query() on line 89 of version 1.5 of the script was making my site flake out.
It must have reset the main WP query on the homepage so that that loop kept loading the homepage post over and over again. So my homepage looked like
[homepage up until display posts shortcode]
[homepage up until display posts shortcode]
[homepage up until display posts shortcode]
… one on top of another until the server timed out.I’m not sure that a wp_reset_query() is necessary there since you are creating your own query object and not calling “query_posts” directly. You might want to use wp_reset_postdata function instead: https://codex.www.ads-software.com/Function_Reference/wp_reset_postdata
This is kind of subtle stuff and I don’t know the exact answer here.
https://www.ads-software.com/extend/plugins/display-posts-shortcode/
- The topic ‘[Plugin: Display Posts Shortcode] wp_reset_query() line in plugin was flaking my site out’ is closed to new replies.