Free Wordpress Blog Setup

How to Hide or Style your Subcategories in WordPress

By Editorial Staff in Tutorials
How to Hide or Style your Subcategories in WordPress

Subcategories are great because it helps us sort content, but sometimes it looks ugly in the template. In this tutorial, we will show you how you can either hide the subcategories, or you can style them with one single code snippet.

First open your style.css, and then add the following code to hide the sub categories:

.children {
display:none;
}

Now you can also use the same code to style them as well for example like this:

.children {
padding: 0 0 0 5px;
margin: 0 0 0 2px;
border-left: 1px solid #333;
}

Feel free to change the code to meet your standards. People actually thought this would be a very hard thing to do, but this is actually very easy.

Free Wordpress Blog Setup

Comments

2 Responses to “How to Hide or Style your Subcategories in WordPress”
  1. Phaoloo says:

    Simple and useful as always :D

  2. Quoc Thai says:

    Thank you for your tutorials ! :) )

Share Your Opinions

Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!

Please make sure that you have read our Comment Policy.

Due to high volume of request from our readers, we are adding this feature that allows you to stay updated with this post's comments without having to participate in the discussion even though we would love your input as always. Don't worry we hate SPAM just as much as you do, so you will never receive any SPAM messages from our site and that's our promise to you.

Subscribe without commenting

Close Bar