If you have started your blog in rush just like me. And you have been writing a lot of posts and have not planned your "Categories" on the beginning. One day you may notice that you may have way to much "Categories". The more you have, the less processional your blog is looking. There may be just one case when you have "hundreds" of categories. It is when your blog have no any general topic.
It is never too late!
Of course it would be much easier if you did it on the beginning before any posts have been written. But you may still fix it and keep all your links indexed by google and up to date. And you won’t have to redirect anything. We will just make it look better for your visitors.
So here is my recipe for easy change without loosing search engine traffic:
1.) Plan your categories
You have missed it on the beginning. So you need to do it now. You need to plan your categories such way, so all of them would fit your blog niche. If you have some posts that are off topic, you should think about category called "Misc" (or something similar).
2.) Create your new categories
Now go to your WordPress admin panel to "Posts / Categories" and create all missing categories. But do not remove any old that do not fit your new plan! You must keep them or you would loose a lot of search engine traffic! We will hide them in next steps.
3.) Add all of your posts to new categories
This part is most time consuming. More posts you have more time it would take to you. You should add your posts to new categories and keep old ones. Such way that it would be in old and new category same time.
4.) Install Executable PHP widget
To display only desired categories. You will need to install "Executable PHP widget". It would replace your current "Categories" widget.
5.) Configure your new "Category" widget
Now put "Executable PHP widget" on your sidebar and configure it to display your desired categories. There are two ways to do it. To include only desired categories or to exclude unwanted. When you put your widget, define its name to "Categories" and in the text area put one of this two code snippets:
Option 1 – Include only desired categories:
<ul> <?php $args = (array( 'include' => '4,5,6', 'title_li' => '' )); wp_list_categories( $args ); ?> </ul>
In the line "'include' => '4,5,6'," you need to include your desired categories IDs. If you don’t know how to find category IDs – I’ll describe it later in this post.
Option 2 – Exclude unwanted categories:
In this case you should put in your widget text area code similar to this one:
<ul> <?php $args = (array( 'exclude' => '1,2,3', 'title_li' => '' )); wp_list_categories( $args ); ?> </ul>
In this option you should edit this line "'exclude' => '1,2,3',". And put comma separated category IDs to exclude from the list.
Where tho find category ID’s?
To find what are IDs of your categories you need to go to admin panel (Post/Categories) and copy link that is on your category name. When you paste it to your text editor it would look simillar to this:
Your category ID is here "cat_ID=1". So in this case it is "1".
It is a small tweak but it let your visitors find out your blog niche. It let them not to be lost in all categories and if they are interested in your blog topic – it is much more possible that they would subscribe your rss or follow you on twitter or even subscribe for updates via email (check my top right sidebar… :).
I want to be helpful for my readers so please let me know in the comments if this post was useful for you and if you want me to write more things like this.