delete_post_meta only removes 5 most recent entries
-
I am creating an uninstall file for a small WordPress plugin i wrote.
I want to remove the entries I added in the wp_postmeta table.
I use the following code for it as describet in the codex:$allposts = get_posts('numberposts=0&post_type=post&post_status='); foreach( $allposts as $postinfo) { delete_post_meta($postinfo->ID, '_myPluginName'); }
But it only deletes the entries from the 5 most recent posts (the other data stays just in the database).
When I ‘prinr()’ the $allposts, I also get only the data from the 5 most recent post.
How can I fix it?
- The topic ‘delete_post_meta only removes 5 most recent entries’ is closed to new replies.