Take the 2-minute tour ×




share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Try this code:



foreach($entries as $entry)
    $post_id = $entry->ID;


share|improve this answer
Thanks for the reply. But where do I run this from? Also, wouldn't it be simple to just run it as a bunch of pure MySQL queries? –  GPX Dec 6 '10 at 7:38
you can run it in your index.php, if you want. –  ariefbayu Dec 6 '10 at 7:48
Ran it, and works! Thanks a ton! –  GPX Dec 6 '10 at 8:20
But why mark it as "THIS IS JUST PSEUDOCODE"? –  GPX Dec 6 '10 at 8:24
Because I didn't test it. I can't say it work. –  ariefbayu Dec 6 '10 at 8:34
show 1 more comment

Seems to be a common problem. Try this plugin:


share|improve this answer
Running the query (in the solution marked as the answer) once, IMHO, is much better than the overhead of another plugin! –  GPX Dec 6 '10 at 8:27
Absolutely. Just easier for someone unwilling to modify code and can be deactivated once complete. –  Jon Dec 6 '10 at 9:02
Yep. It's better than modify code and it's true that it's easier to activate this plugin and deactivate once you've done with it. –  ariefbayu Dec 6 '10 at 10:20
add comment


share|improve this answer
add comment

Your Answer


