Wordpress

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s