I just upgraded the List Category Posts plugin from 0.18.3 to 0.21 and my website has failed.
I’ve determined that the difference causing the failure is that the previous version passes a string parameter to get_posts() while the new version sends the arguments as an array.
The problem is that the default value for post_parent=0 does not seem to have an effect when passed as a string (e.g. “?cat=55&post_parent=0”) but it is being applied when the parameter is being passed as an array (e.g. array( ‘cat’=>’55’, ‘post_parent’=’0’) ).
My posts are post_type=’post’, for which post_parent should not be applicable. Many of my posts have a post_parent value which is not zero. They were previously batch converted from pages and it appears that the conversion has left the post_parent value with the id of the previous parent page.
As a result of this, all those posts which were previously converted from pages with a parent have disappeared from my category lists.
Can anyone explain why the parameter is being applied as an array and not as a string.
Why is the default value for post_parent 0 fro the plugin, while it is empty for get_posts()?
Since version 0.19, the plugin sends an array to
get_posts
to support custom taxonomy (see here).I just uploaded version 0.21.1 with a small bugfix, it doesn’t pass the
post_parent
parameter toget_posts
if you didn’t set it. Please give the new version a try and let me know if it’s working for you.