Forums

merge/rename categories plugin not working with 2.7 (19 posts)

  1. abidavis
    Member
    Posted 4 years ago #

    Hi

    I found this plugin: http://www.bubub.org/blog/bulk-renamemerge-categories-wordpress-plugin/

    It does just want I would like it to do but it will not work with 2.7. The renaming part does but the merging bit doesn't.

    I then found this plugin "Extend Categories Manager" (http://www.funponsel.com/blog/wordpress-plugins/) and this also does not work with 2.7.

    Does anyone know of any other plugins that do merging and renaming of categories with 2.7?

    Thank you

  2. MichaelH
    Member
    Posted 4 years ago #

    You know you can delete a category and have the posts that belong to that category be assigned to the Default Post Category? So the trick is to make the Default Post Category be the category you want to hold the posts of the deleted category.

    It's a little boring, but does handle renaming and merging needs.

  3. ejabs
    Member
    Posted 4 years ago #

    Yeah...this works...just be careful that you don't think it's not working. I changed my default category then deleted a category (to have the posts moved to that category) and the post count on the default category never changed! But...that was because all the posts in that category, were already in the default category too.

    Thanks,

    Matt of eJabs

  4. ejabs
    Member
    Posted 4 years ago #

    I take it back.

    This is NOT WORKING for me.

    Even if the posts in the category I'm deleting are not also in my default category...when I delete the category...the posts are NOT moved to the default category.

    Well...more precisely, sometimes they are & sometimes they are not. Frustrating

  5. abidavis
    Member
    Posted 4 years ago #

    Thank you for your replies.

    I have multiple categories that I need to merge so using the default option is not really going to work.

    Am still looking round for a solution for WordPress 2.7

  6. auburn305
    Member
    Posted 4 years ago #

    I'm in the same boat. Deleting and having them move into the default category is not an option.

  7. Jeremy Clarke
    Member
    Posted 4 years ago #

    Damn, this is depressing. For those who don't know why it sometimes works the answer is hidden in the description at the bottom of the category management page:

    Note: Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category Afrikaans.

    So if any of the posts were in multiple categories they just lose the old one and don't gain the new one. The trick isn't intendef for merging categories together, it's really just to avoid situations where posts suddenly have NO categories, which causes bugs.

    We really need a way to accomplish this in 2.7, I don't know why it isn't a core feature actually.

  8. Ryan S
    Member
    Posted 4 years ago #

    Yes, this plugin is not working for me too!!!

    renaming works, but merging does not.. Is there any other plugin?? Or is it possible from codings???

  9. Jeremy Clarke
    Member
    Posted 4 years ago #

    I talked about this in the #wordpress-dev IRC channel and Westi was nice enough to work on the code a bit with me to figure out a relatively simple way of merging categories using plugin code (you'd need to know php but at least you wouldn't have to write all the messy SQL yourself!). I haven't had time to try it yet and it will only be in 2.8, but if I get it done I'll post an example here. Hopefully someone will write a plugin now that it's simple and supported by the api :)

  10. crazybilly
    Member
    Posted 4 years ago #

    Did you have any luck, Jeremy? I'm stumbling around w/ the same problem.

    I could probably hack the php together for this, but honestly SQL scares me.

    Thanks!

  11. Jeremy Clarke
    Member
    Posted 4 years ago #

    Okay, so I just tried it and it works! It's even a fairly simple patch to apply to an existing install if it strikes your fancy.

    This is the trac ticket about it: http://core.trac.wordpress.org/ticket/9355#comment:3

    This is an example of how you'd use the code:

    // Use the Term_id for the categories to merge. Its in the url of the 'edit category' links in POSTS > CATEGORIES
    $term_to_delete = 9;
    $destination_term = 3;
    
    wp_delete_term($term_to_delete, 'category', array('default' => $destination_term, 'force_default' => true));

    Like I said, this will only be available as of WordPress 2.8 though. If you really want it now you can probably take the code for the wp_delete_term() function in the trunk copy of wordpress' version of the /wp-includes/taxonomy.php file ( http://core.trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php?format=txt ) and replace the old version in your 2.7 copy of /wp-includes/taxonomy.php . Be careful and test it first though, as you might mess it up or there may be unforseen problems.

    Hope thats helpful!

  12. Roar
    Member
    Posted 3 years ago #

    Hi there,

    found this post per a link from Jeremy. Is there anything happening with this that can be done easily in 2.8 as far as merging tags? Like, is there a working plugin?

    Please note: Tags. I want to merge tags, not categories.

    Forgive me for not understanding all of the stuff about trunks and cores and tracs to know if I can do it.

  13. scribu
    Member
    Posted 3 years ago #

    Rori, you can try this plugin: Merge Tags

  14. Roar
    Member
    Posted 3 years ago #

    Oh My GOSH!

    I could kiss you.

  15. scribu
    Member
    Posted 3 years ago #

    Ok, just send yourself through email. :P

  16. 20020
    Member
    Posted 3 years ago #

    same issue here... we need to merge some tags...

    scribu´s plugin page is not working? any alternative link to download it or any other solution?

    I find a pity this is not a built-in core feature, I can image its a quite common necessity...

    thanks for the help in advance.

    cheers!

  17. 20020
    Member
    Posted 3 years ago #

    correction: I manage to download it, it seems the site was just down yesterday.

    and it works like a charm!

    thanks a lot, this is great !

  18. Roar
    Member
    Posted 3 years ago #

    Any updates on a working category merge plugin?

  19. scribu
    Member
    Posted 3 years ago #

    You can use the Merge Tags plugin by going to this URL on your site:

    /wp-admin/edit-tags.php?taxonomy=category

Topic Closed

This topic has been closed to new replies.

About this Topic