Batch Categories for Wordpress, updated for 1.5.2

Stephanie Booth’s Batch Categories for Wordpress is an invaluable help, theoretically, for setting categories on lots of posts at once. However, it doesn’t work properly in Wordpress 1.5.2. I’ve updated it so that it does work properly, and you can download the new Batch Categories 0.92. Installation instructions are in comments at the top of the file.

30 Responses to “Batch Categories for Wordpress, updated for 1.5.2”

  1. All this with my consent, of course. Many thanks, hope you folks enjoy it!

    Stephanie Booth
  2. This only seems to be working for the most recent 10 posts and I can’t seem to find any means to progress through ny blog… Any ideas?

    gabriel
  3. gabriel: there are two ways. The first is to add num=50 or similar to the URL, which will show fifty posts rather than 10. It’s not possible to show the *next* fifty posts, though. It’s obviously possible to show all posts, by saying lim=100000 or similar, but the page takes a long time to render if you’ve got a lot of posts like I have.
    The second is a step more involved. All my uncategorised posts are actually in category “Uncategorized”. So what I’m doing is using the dropdown at the top to pick category “Uncategorized”, which will show the next 10 uncategorised posts, and then going through them 10 at a time that way. (You could go through them 100 at a time if you like, as above).

    sil
  4. [...] Tried that and it worked almost perfectly. I was able to write a SQL command to turn on comments and pings. The only thing I have to do now is go in and select a category for each post in order for all of them to show up in the archives. There is supposedly a mass change for updating categories, but I couldn’t get it to work. « Still thinking…   [...]

    m2h blogging » New Home
  5. I’m sorry to say that it didn’t work for me :((
    Always the blank page and nothing else…
    Anybody got an idea?

    marc
  6. I found the problem: ‘batch-categories’ doesn’t work with the French language module! I’ll see what I can do.

    marc
  7. Marc: ooh. I’m afraid I’ve got no idea how to fix that, but I’m quite happy to roll in any patches you provide!

    sil
  8. Now I found the solution! It looked batch-categories didn’t work with any localisation except default the english-us (any other localisation you specify in config.php). The solution is to move the require_once(admin.php) and require_once(admin-header.php) BEFORE require_once(’../wp-includes/wp-l10n.php’) (move 2 lines in your patch).
    And your patch works fine! Even in the French localisation of wp (and the german one to!)

    marc
  9. I’ve uploaded the new batch-categories.php file, and I’m still getting a blank screen. No admin screen. Did anyone come up with a solution for that? I’ve looked through the posts on the forum, but didn’t want to post until I tried this newer version. I’m using wp-1.5.2. Thanks. Feel free to leave comments at my site, or contact me, amanda@customerservant.com

    Amanda Rush
  10. Hey, thanks a lot.
    Saved the code on the file and it works. :)

    daisy duck
  11. hmm, I’ve tried to use this with wordpress 2.0 and the posts simply don’t show up in the admin screen. the number of fields shown for the category is correct, but the ID, title and categories are not shown. If I click on ‘edit’ though, it takes me to the right post…

    evane
  12. WP2.0 support would be fantastic!

    Ed
  13. I’m on WP 2.0.1. I am having the same problems as evane…..my batch-categories.php screen does not display the titles of the posts, although I can view the specific post by clicking on edit - but using the edit button to change the category negates the whole point of the plugin.

    Is there any fix I can apply to the batch-categories.php file to make the titles of the posts show up?

    Jen
  14. In terms of WP2.0, I’m not using it yet, so I haven’t updated the plugin. I’ll be happy to incorporate any patches, though.

    sil
  15. Another plea for WP 2.0 support.. I can’t find any other plugin that accomplishes the job

    Monica
  16. I looked long and hard at the code to figure out why the hidden elements displayed correctly and the displayed HTML did not in WP 2.0.1. I figured out that you don’t need a second ’start_wp();’ call in the Main Form’s ‘foreach’ loop. All you have to do is comment (or delete) that ’start_wp();’ and it works beautifully for WP 2.0.1. I hope Stephanie and Sil don’t me posting this. Feel free to contact me if not.

    Myles
  17. I may have spoke prematurely. All the batch changes work properly with the hack above, but the ‘update’ feature does not work due to an incorrect ID #. I’m going to see if I can figure out why.

    Myles
  18. Ok. I put in a really messy, but quite workable workaround to the $id issue. It really only involved a couple lines of code and doesn’t really get to the heart of what’s causing the problem, but it now functions as advertised in WP 2.0.1. You can get it at this link. Once again, I would like either Stephanie or Sil to contact me if there are any issues with me futzing with the code.

    Myles
  19. To all those concerned: I have no issue whatsoever with any modification to my code or modifications to modifications, as long as:

    - my name and the names of other contributors remains somewhere
    - you’re not making money off it
    - you allow others to modify it further

    (Remember the Creative Commons by-nc-sa license? that’s it.)

    So have fun, people :-)

    Stephanie Booth
  20. “All the batch changes work properly with the hack above, but the ‘update’ feature does not work due to an incorrect ID #. I’m going to see if I can figure out why.”

    I am actually having a similar problem with WordPress 1.5.2. I can make batch changes to the entire group, but pressing the “Update” button next to each post has no effect. There’s no error message or anything — it just reloads the page without making any changes.

    Just for the heck of it, I tried Myles’s workaround, even though it was designed for a different version of WP… but it had no effect. Any ideas?

    Brendan Loy
  21. P.S. Please e-mail bloy[at]nd.edu instead of the above address if you want to respond by e-mail. My brendanloy.com addresses are being a bit wonky right now.

    Brendan Loy
  22. Hi guys -

    Indeed, I got Myles’ version to work. Thanks dude. And thank you to Mme. Stephanie for her brilliant original work. Thank you so much.

    But here’s the question, really: is this plugin under constant revision? Like, is there a project site other than the admirable climbtothestars.org? Can I suggest features? I mean, I love the plugin, but it’d be quite a bit more useful to me to be able to select entries by date. I’m unable to do that by searching…

    Anyway, thank you again. You talented developer people make the world go ’round and give casual geeks like myself brilliant and life-simplifying things to play with.

    b
  23. [...] ありましたよ!カテゴリー一括変換。 as days pass by » Batch Categories for Wordpress, updated for 1.5.2 batch-categories.php [...]

    aoiro-blog » WordPress:カテゴリーの一括変換 batch-categories
  24. I’m using WP2.0.1 but can’t get it to work. Also tried the modified code provided by Myles. I always get this errormessage to start with:

    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /etc/etc/etc/wp-includes/wp-l10n.php on line 67

    When I delete this line I get

    Fatal error: Call to undefined function: __() in /etc/etc/etc/weblog/wp-admin/batch-categories.php on line 24

    Any idea why? Some use it with WP2.0.1 and no problems at all.

    Jack
  25. Hello…I am using WP 2.0 (whatever the neweset one is) and I have been following how to get this to work all the way from Stephanie’s site. :) I got through the blank screen problem and the posts not showing up problem. Now it will only update the categories on the very last post when I click the “update button”. So I can still only update one category at a time.

    Jetgirl
  26. (on WP 2.0) The script runs for me…but it doesn’t update the categories. I tried both the original script and the modifed one.

    gmustuk
  27. Is it compatible with WP 2.0?

    andryonline
  28. Yeah. Please let us know whether it works with WP 2, please.

    Thanks a lot. :o)

    Lautreamont
  29. Had the same problem! Resolved it, but sorry to say I cannot understand how! Working on it.

    Broadcaster
  30. yess, I need support for 2.0 too!!

    Andre