3

I’ve got 2 categories each with lots of entries. The client wants to delete one category, and transfer it’s entries into the other one.

If I delete the category, it just disappears, but I somehow need to mass assign all those entires into another category without going through each entry manually.

Any ideas welcome.

2

This could easily be accomplished with a MySQL query on your DB. Of course, BACK UP YOUR DATABASE FIRST!

Example, assuming the old category ID is 1 and the new one is 2...

UPDATE `craft_relations` 
SET `target_id` = 2 
WHERE `field_id` = [your field id] AND `target_id` = 1;
| improve this answer | |
  • This worked brilliantly thanks. Finally got round to doing it properly. Test on Dev server and be very methodical with no distractions for each time you do it. There’s an advanced category manager plugin to be had here perhaps. Another day. – Simon Clayson Sep 26 '16 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.