Hack Batch Categories Plugin to Show More Posts Per Page

Although I long for the now appar­ent­ly defunct ManageMe WordPress Plugin, Rob Miller’s Batch Categories plu­g­in, which allows you to add, remove, or sub­sti­tute post cat­e­gories and tags enmasse, is a wor­thy replace­ment for part of the ManageMe func­tion­al­i­ty. Batch Categories has an annoy­ing lim­i­ta­tion, how­ev­er: it’s hard­cod­ed to only show 15 posts per page–and thus only man­age 15 posts per page. I don’t know about you, but I’d rather do as much as I can on a sin­gle page, in one oper­a­tion. Thus, I hacked Rob’s plu­g­in. So can you.

  1. If aren’t already using the lat­est ver­sion of Batch Categories, go down­load it.
  2. After unzip­ping the plu­g­in (or installing it), open Admin.php in Notepad or in the WP edit plu­g­in screen.
  3. At line 21 you’ll find the below code (note that Rob obvi­ous­ly intends his plu­g­in to some­day han­dle more than 15 posts per page):

    // Maybe make this an option some time
    $per_page = 15;

  4. Change the val­ue of $per_page, replac­ing 15 with how­ev­er many posts you’d like to man­age at once (I usu­al­ly keep it set for 100, but I’ve suc­cess­ful­ly run it up to 500 posts per page).
  5. Save the plu­g­in and install it (if you had­n’t already).

From now on, you’ll be able to batch man­age cat­e­gories and/or tags on more posts than the default 15.

Hopefully Rob will open that option up to in the admin UI in a near future release. Until then, it’s a sim­ple hack.

4 thoughts on “Hack Batch Categories Plugin to Show More Posts Per Page

  1. Ruth Marie Sylte

    Thank you so much for shar­ing this. It has real­ly made a dif­fer­ence in my abil­i­ty to use Batch Categories effi­cient­ly and easily.

  2. hammy

    Thank you very much. I’ve been rack­ing my brains for some solu­tion to my uncat­e­go­rized blog entries. Batch Categories came clos­est to help­ing me, but with­out this hack, it was get­ting to be real­ly difficult.

    :D Stumbled, AND tweeted.

  3. Egyptian Costumes

    Hey, Thank you for this hack, I had been look­ing for this fix for a long time.

    Best

Comments are closed.