EDITS.WS

Tag: categories

  • How to Convert WordPress Categories to Custom Taxonomies

    Do you want to convert your WordPress categories into custom taxonomies?

    Categories are one of the two default taxonomies that help you sort your content. WordPress also allows you to create and use custom taxonomies.

    In this article, we will show you how to easily convert WordPress categories to custom taxonomies.

    Converting WordPress categories to custom taxonomies

    Why and When Do You Need to Convert Categories into Custom Taxonomies?

    A taxonomy allows you to organize groups of posts and custom post types on your WordPress website. By default, WordPress comes with two pre-made taxonomies: categories and tags.

    However, you can also create custom taxonomies with WordPress, which can be used with existing or custom post types.

    As your WordPress blog grows, you might need to convert your categories into a custom taxonomy because it can be overwhelming to file and keep track of each post in a category with different subcategories.

    Using custom taxonomies for tagging allows for more accurate and detailed classifications and better content organization.

    For example, if you have a recipe website, then creating categories for cuisine type, dietary restrictions, and meal type can be a bit confusing.

    Preview of categories and subcategories

    However, by creating a custom taxonomy for each of these topics, you can make content organization easier.

    Custom taxonomies can also help improve your SEO rankings by giving you the flexibility to use more specific and targeted taxonomy terms.

    Having said that, let’s take a look at how you can easily convert categories into custom taxonomies.

    How to Convert WordPress Categories to Custom Taxonomies

    First, you will need to install and activate the Taxonomy Switcher plugin. For more detailed instructions, you may want to see our step-by-step guide on how to install a WordPress plugin.

    Upon activation, head over to the Tools » Taxonomy Switcher page from the WordPress admin sidebar to convert categories to custom taxonomies.

    Once you are there, you need to select the ‘Categories’ option from the ‘Taxonomy to switch from’ dropdown menu.

    This means that we will be converting a category into a custom taxonomy.

    Choose categories option from the Taxonomy to switch from dropdown menu

    Next, select the custom taxonomy that you want the categories to turn into from the ‘Taxonomy to switch to’ dropdown menu.

    For example, if you have a category for dietary restrictions and you want to switch to a taxonomy of the same name, then you can select the ‘Dietary Restrictions’ option from the dropdown menu.

    If you don’t know how to create a custom taxonomy, then you may want to see our tutorial on how to create a custom taxonomy in WordPress.

    Choose your custom taxonomy from the dropdown menu

    If you want to convert all the categories on your WordPress site into this specific custom taxonomy, then simply click the ‘Switch Taxonomies’ button.

    However, if you just want to convert singular or multiple categories into this taxonomy, then you will need to add the IDs of those categories into the ‘Comma separated list of term ids to switch’ field.

    Add category ID

    To find a category id, you will need to visit the Posts » Categories page from the WordPress dashboard and hover your mouse over the category of your choice.

    The category edit URL will now appear in a popup box at the bottom left corner of your screen.

    From here, you can easily find your category ID, as it is the number that comes after ‘category&tag_ID=’ and before ‘&post_type’ in the URL.

    For more instructions, see our tutorial on how to find category IDs in WordPress.

    Attain category ID

    Once you have found the IDs for categories, head back to the ‘Taxonomy Switcher’ page.

    Next, simply add the IDs for all the categories that you want to convert into a specific taxonomy. Keep in mind that if you add more than one category ID, then you will have to separate them using commas.

    Type category IDs in the field

    Some of the categories in WordPress also have subcategories (child categories).

    However, if you want to skip the child categories, then you can type the parent category next to the ‘Limit taxonomy switch for child terms of a specific parent’ option. This way, only the parent category will be switched to a taxonomy.

    Finally, click the ‘Switch Taxonomy’ button to convert your WordPress category to a custom taxonomy.

    Type parent category

    You will now see the taxonomy that you have created along with the default taxonomies in the Posts menu tab in the WordPress sidebar.

    Upon clicking on the custom taxonomy, you will be taken to a new page, where you can easily add terms for the taxonomy by typing in a name and slug.

    Add a term to the dietary restrictions taxonomy

    Once you have done that, just click the ‘Add New’ button at the bottom to create a new taxonomy term.

    Now visit your WordPress block editor by opening up a new or existing post/page.

    Here, you will notice that the category you switched to taxonomy is now displayed in the block panel on the right corner of the screen. From here, you can now easily add new terms or use existing ones for your WordPress blog post.

    Custom taxonomy preview

    How to Set Up Redirects From Category to Custom Taxonomy

    After you turn one of your categories into a custom taxonomy, the category archive page will now show a 404 error. This is nothing to be worried about if your website is not live yet.

    However, if your website is live, then search engines may have already crawled your category pages and indexed them. This means that those pages can appear in search results, and users coming from search engines will see a 404 error page.

    To fix this, you need to redirect users to the new taxonomy page for each category.

    To do this, you will need to install and activate the All in One SEO for WordPress plugin. For more details, see our beginner’s guide on how to install a WordPress plugin.

    All in One SEO

    AIOSEO is the best WordPress SEO plugin on the market. It comes with a powerful redirection manager addon that makes it very easy to find broken links and fix them using 301 redirections.

    Note: AIOSEO also has a free version. However, you will need the pro version for this tutorial to unlock the 301 redirection feature.

    Upon activation, you will need to configure AIOSEO for your website. For more detailed instructions, please refer to our guide on how to set up All in One SEO correctly.

    Once you have done that, head over to the All in One SEO » Redirects page from the WordPress admin sidebar.

    Here, you will see a prompt asking you to activate the redirection manager. Go ahead and click the ‘Activate Redirects’ button.

    Activate AIOSEO Redirects

    The Redirects page will now be displayed on your screen.

    From here, simply add /category/.* into the ‘Source URL’ field.

    Once you do that, click the gear icon in the field to open some additional settings for the source URL. From here, check the ‘Regex’ option.

    After that, enter your custom taxonomy slug, e.g. /dietary_restrictions/1 into the ‘Target URL’ field.

    Add the source and target URL

    Next, make sure that ‘301 Moved Permanently’ is chosen as the redirect option from the dropdown menu.

    Finally, click the ‘Add Redirect’ button in the right corner.

    Choose 301 as the redirect type

    Upon creation, the redirect you created will be displayed at the bottom of the page.

    From here, you can always toggle the switch to ‘Inactive’ if you want to disable it.

    Disable the redirect by toggling the switch

    This redirect will now send all your category archive traffic to your custom taxonomy.

    However, we recommend using this method only if you don’t want to use categories at all.

    If you want to redirect individual categories to a custom taxonomy page, then you may want to see our beginner’s guide on setting up redirects in WordPress.

    We hope this article helped you learn how to convert WordPress categories to custom taxonomies. You may also want to see our guide on how to style individual categories differently in WordPress and our expert picks for the best conditional logic plugins for WordPress.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Convert WordPress Categories to Custom Taxonomies first appeared on WPBeginner.

  • How to Properly Change, Move and Delete WordPress Categories

    Do you want to change, move, or delete WordPress categories?

    Categories help organize your content and make it easy for visitors to find interesting posts. However, as your website grows and you learn more about your audience, you may need to change your categories.

    In this article, we will show you how you can easily change, move, and delete the categories on your WordPress website.

    How to properly change, move and delete WordPress categories

    Why Change, Move or Delete WordPress Categories?

    Categories help sort your blog posts and make it easier for users to find what they are looking for. This will keep them on your website for longer and encourage them to convert.

    However, it can be difficult to plan all your categories in advance. This is especially true if you’re just getting started with WordPress, or aren’t sure which direction to take your new blog, online store, or small business website.

    You may also want to try out different categories and content, and then analyze what works the best by installing Google Analytics in WordPress. You can then use this insight to fine-tune your categories.

    With that being said, at some point, you may need to change your WordPress categories. This might involve renaming a category to include the keywords that got the most clicks during A/B split testing, or fixing a spelling mistake.

    You might even organize your categories and subcategories into new parent-child relationships to help visitors discover new content.

    If you don’t make these changes carefully, then it could hurt the visitor experience, damage your SEO, and make it more difficult for visitors to navigate your website.

    With that being said, let’s see how you can properly change, move, and delete WordPress categories. Simply use the quick links below to jump straight to the change you want to make.

    How to Rename or Edit a WordPress Category

    To start, you can change a category’s name, assign it to a different parent category, or display a category description to help other authors understand how to use that category.

    To make any of these changes, head over to Posts » Categories.

    How to change WordPress categories

    Here, find the category that you want to change and hover the mouse over it.

    When the ‘Edit’ link appears, give it a click.

    How to edit the categories on your WordPress website

    This will take you to a screen where you can rename the category, add a parent or subcategory, or write a category description. For example, if you’ve used a keyword research tool to find some new keywords or phrases, then you may want to change the category’s name to include these words.

    To rename a category, simply type the new title into the ‘Name’ field.

    Renaming a WordPress category

    When you’re happy with the changes you’ve made, don’t forget to click on ‘Update’ to store your settings.

    After that, WordPress will automatically update all the posts within this category.

    Every category has an archive page in WordPress, as you can see in the following image. These pages help visitors find related content, which can increase your pageviews and reduce the bounce rate in WordPress.

    The WordPress category archive page

    Sometimes you may want to change where this archive page is located. For example, if you’ve renamed a category, then you might also change its archive URL to avoid confusing visitors.

    However, changing the slug means that anyone who tries to visit the original URL will get a 404 error.

    A 404 error page on a category archive page

    This is a bad user experience and can impact your WordPress SEO. Thankfully, you can easily fix this problem by creating a redirect.

    With that in mind, go ahead and change the slug by going to Posts » Categories. Then, find the category that you want to edit and hover the mouse over it.

    When the ‘Edit’ button appears, give it a click.

    How to move a WordPress category to a new slug

    In the ‘URL’ field, you’ll see the current slug for this category’s archive page.

    Simply type in the new URL that you want to use. Just be aware that you can only use lowercase letters, numbers, and hyphens in the URL.

    How to edit the URL slug for a category archive page

    When you’re happy with how the slug looks, scroll to the bottom of the screen and click on ‘Update’ to store your changes.

    Now, you’ll see the archive page if you visit the new URL, but you’ll get an error if you type in the original link.

    The easiest way to redirect from the old URL to the new link is by using AIOSEO.

    AIOSEO is the best SEO plugin for WordPress and can help you get more visitors from search engines like Google. It even has a setup wizard that will help you choose the best SEO settings for your website and improve your rankings, even if you’re completely new to search engine optimization.

    For this guide, we’ll be using the AIOSEO Pro version because it has the Redirection Manager that you’ll need to set up a redirect. However, there is also a free version of AIOSEO that you can use to optimize your website no matter what your budget.

    First, you’ll need to install and activate the plugin. If you need help, then please see our guide on how to install a WordPress plugin.

    Upon activation, AIOSEO will automatically launch the setup wizard. You can simply click on ‘Let’s Get Started’ and then follow the onscreen instructions to improve your site’s search engine rankings.

    Click let's get started AIOSEO setup wizard

    To learn more, please see our step-by-step guide on how to set up All in One SEO for WordPress correctly.

    Since we want to use the plugin’s premium features, you’ll need to enter a license key when asked. You can find this information under your account on the AIOSEO website.

    Enter AIOSEO license key

    After entering the license key, click on the ‘Finish Setup’ button to save your settings and close the setup wizard.

    With that out of the way, head over to All in One SEO » Redirects in the WordPress dashboard. You can then go ahead and click on Activate Redirects.

    Activating the AIOSEO redirect feature

    Now you’ve activated the Redirection Manager, you can start by typing in the source URL. This is the category archive’s original web address, and will usually start with /category/ followed by the original category name.

    Here, we’re redirecting anyone who tries to visit /category/search-engine-optimization.

    Adding a source URL for your category redirect

    After typing in the source URL, make sure you click on the small cog icon to see some extra settings that you can configure.

    You’ll need to check the box next to ‘Regex.’

    Creating a regex redirect in WordPress

    Now, it’s time to move to the target URL, which is our new category archive page.

    In the following image, visitors will be redirected to /category/seo.

    Adding a 301 redirect to your WordPress website

    Your next task is choosing the type of redirect that AIOSEO should use. There are various types of redirects that are identified with numbers such as 301, 302, and 307.

    If you’re permanently moving the archive to a new location, then you’ll want to use a 301 redirect as this tells search engines that the page will always be at this new location. This way, all the old archive’s traffic and backlinks are transferred to the new page.

    Simply open the ‘Redirect Type’ dropdown and choose ‘301 Moved Permanently.’

    Choosing a redirect type for your WordPress website

    If you’re only temporarily moving the category archive page to a new URL, then you should choose ‘307 Temporary Redirect’ instead.

    When you’ve done that, go ahead and click on the ‘Add Redirect’ button.

    Now, if you try to visit the original category archive page, AIOSEO will automatically redirect you to the new target URL.

    How to Properly Delete a WordPress Category

    Sometimes you may no longer need a particular category. For example, you may have accidentally created two very similar categories or changed the direction of your WordPress blog so you no longer cover the same content.

    Before deleting a category, it’s important to think about how this will affect your WordPress website. Firstly, WordPress will remove the deleted category from all your posts. Any posts that no longer have a category, will be marked as ‘uncategorized.’

    Lots of uncategorized content will make it more difficult for visitors to explore your website. With that being said, you may want to look through all the posts within the category you plan to delete, to make sure they have at least one alternate category.

    You can also set up a redirect for that category’s archive page by following the same process described above. This can help you fix any broken links before they hurt your search engine rankings or the visitor experience.

    When you’re ready to delete the category, simply go to Posts » Categories. You can then hover the mouse over the category and click on the ‘Delete’ link when it appears.

    How to delete a WordPress category

    How to Change the Default Uncategorized Category

    If you don’t assign a category to a post, then WordPress will assign one automatically. By default, this is ‘uncategorized’ but you may want to change this to an alternative category.

    Another option is to continue using the ‘uncategorized’ category, but give it a more descriptive and useful name.

    This change is particularly important if you run a WordPress multi-author blog or accept guest contributions, as these people may forget to add a category to their posts.

    Changing the default category can also improve your WordPress SEO by making sure that every post has a descriptive category.

    Let’s start by renaming the uncategorized category by going to Posts » Categories.

    Here, find ‘Uncategorized’ and hover your mouse over it. When the ‘Edit’ link appears, give it a click.

    Renaming the default uncategorized category

    You can now type a new title into the ‘Name’ field.

    After that, scroll to the bottom of the screen and click on ‘Save.’

    How to rename the default WordPress category

    Another option is to change the default category. This can be useful if you’ve already created a general category, and now want to use it as your default.

    To make this change, head over to Settings » Writing in the WordPress dashboard. You can then open the ‘Default Post Category’ dropdown and choose any category from the list.

    How to delete a WordPress category

    After that, don’t forget to click on ‘Save Changes’ to store your settings.

    How to Add a Subcategory in WordPress

    WordPress allows you to add category hierarchy, so you can add sub categories as needed.

    You can do this easily by using the Parent category dropdown on the Add New Category screen.

    Select a parent category in WordPress

    For more details, see our step by step guide on how to add subcategories in WordPress.

    How to Easily Convert Categories into Tags

    Categories and tags are both important ways to organize and group your posts. However, to help visitors find their way around your site, you should use them in slightly different ways.

    Categories are great for broadly grouping your posts, while tags are meant to describe the specific details of each post.

    Visitors can use categories to quickly find the type of content they’re interested in, or their favorite subject. They can then use tags to pinpoint the exact post within that category.

    At WPBeginner we have a Beginner’s Guide category, which is aimed at new WordPress users. Each post in the Beginner’s Guide has different tags, such as custom taxonomy, SEO, and sorting your content.

    It’s easy to get categories and tags mixed up, especially if you’re just getting started with WordPress. Your website may also change over time, to the point where one of your tags would now work better as a category.

    You can easily turn categories into tags, using the Categories to Tags Converter plugin. For example, you can turn a ‘Beginner’s Guide’ category into a ‘Beginner’s Guide’ tag with the click of a button. Even better, all posts that were categorized as ‘Beginner’s Guide’ will be assigned the new ‘Beginner’s Guide’ tag automatically.

    This can save you a ton of time and let you test different ways of organizing your content.

    First, you’ll need to install and activate the Categories to Tags Converter plugin. If you need help, then please see our guide on how to install a WordPress plugin.

    Upon activation, go to Tools » Import. Here, find ‘Categories and Tags Converter’ and click on its ‘Run importer’ link.

    Converting a WordPress category into a WordPress tag

    You’ll now see all the different categories and tags you’ve created for your website, organizied into tabs.

    To convert a category into a tag, simply check the box next to it. You can then click on the ‘Convert Categories’ button.

    Easily turn a category into a tag

    After a few moments, you’ll see a ‘Converted successfully’ message. To turn more categories into tags, simply repeat the process described above.

    To turn a tag into a category, select the ‘Tags’ tab. You can now check the box next to the tag that you want to change, and click on the ‘Convert Tags’ button.

    Converting a WordPress tag into a WordPress category

    We hope this article helped you learn how to properly change, move, and delete WordPress categories. You can also go through our guide on the best email marketing services and proven ways to make money online blogging with WordPress.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Properly Change, Move and Delete WordPress Categories first appeared on WPBeginner.