Support » Plugin: Simple Taxonomy Refreshed » Rename taxonomy

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nwjames

    (@nwjames)

    @makeupedia,
    Thank you for your question.

    Since you can simply create a new taxonomy with a different name, I believe your question is really does the plugin allow you to change the taxonomy slug have all the existing terms AND usages transfer with it.

    With the current functionality you can create a second taxonomy and copy the terms themselves across, but their usages are not.

    It would be relatively simple to extend the functionality for a pure rename process.

    It would be useful if you could confirm whether this is what you are trying to do – and what problem you are trying to solve by the rename of the slug.

    Regards,
    Neil James

    Thank You!

    I created a new taxonomy with the correct name, but I can’t find any information how to transfer the Post Terms from the previous taxonomy.

    Plugin Author nwjames

    (@nwjames)

    @makeupedia,
    Thanks for your reply.

    At one level it’s actually quite simple to move all Terms and their usages from one Taxonomy to another.

    [Just make sure that they are both hierarchical or both not and they have been defined to act on the same set of post_type(s).]

    You need to run an SQL statement similar to:

    update wp_term_taxonomy
     set taxonomy='new_slug'
     where taxonomy='old_slug';

    This can be done from phpmyadmin or similar tool. Just be very sure that the slug names are entered correctly. If the terms disappear from both taxonomies then you have not typed the new name correctly. Don’t worry, you have not deleted anything. The names just don’t match.

    Note that your table may have a different prefix than wp_ – the default one.

    Alternatively you will need to wait until Monday week when I’ll release a version of the plugin that includes renaming the slug as a tool option.

    Hope this is of use,
    Neil James

    Plugin Author nwjames

    (@nwjames)

    @makeupedia
    I have uploaded a version of the plugin that allows you to change the slug for a custom taxonomy. On changing it, the term_taxonomy table will also be updated – therefore automatically updating all the usages of the taxonomy.

    During testing, I found entries corresponding to “slug_clidren” in the options table. These rows are updated as well.

    The update panel contains the rewrite slug (if defined) and query_var fields since these are the two fields where the taxonomy is referred to in URLs.

    Hope this is of use,
    Neil James

    Thank you Neil James!

    I renamed the taxonomy slug and it was successful, it also said “127 terms were migrated.” I can see that it is working front end, but back end only the parent terms are visible. It still does says 127 terms, but I can only view and edit the 6 parent terms!

    Maybe there is a way to fix this issue as well?

    Thanks again!

    Plugin Author nwjames

    (@nwjames)

    caroline,
    There were 127 term_taxonomy records updated. I assume that is all of them.

    I associate the terms front-end as happening in the browser and back-end as being on the server.

    However within the WordPress context, I see people mean back-end as being in the wp-admin screens.

    If that is so, are you saying that you are seeing only 6 values in the screen:
    site-address/wp-admin/edit-tags.php?taxonomy=slug

    In the post editing screen do you get a metabox with all terms or on the 6 parent ones?

    Do you have any other plug-ins that affect the taxonomy tyhat you know of, e.g. taxonomy ordering?

    I cannot think why you are seeing only a sub-set of the terms although I can imagine reasons why you would see none of them.

    Could you use the Taxonomy maintenance screen to export the taxonomy in PHP format and share that (though I don’t really expect to see anything)

    Sorry to give the problem back to you,
    Neil James

    Hi and thank you for your quick respond!

    Yes you are following what I mean (sorry I now back-end is totally different from wp-admin, but I’m glad you understood!) I went offline for a couple of hours and I just had a look now and they are visible again so I can edit them.

    I didn’t change anything, so I guess it only needed some time? Because I refreshed the page several times (ctrl + F5) earlier and nothing happened.

    But it works fine now and thanks again for your help!

    Plugin Author nwjames

    (@nwjames)

    caroline,
    I am relieved that it has worked – even with a delay.

    I found some days ago that I had made a small error in the logic of defining the variable query_var in the taxonomy register process so I will be uploading a new version of the plug-in today or tomorrow.

    I have tried to think about the cache issue. Though I am a little surprised about there being a caching problem as logically it would create new values. When I put the new version back I will change the order of the processing which probably have an effect.

    Not useful for you, but possibly for others.

    Thank you for trying it out.

    Regards,
    Neil James

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Rename taxonomy’ is closed to new replies.