Remove Category Above Post Title

How To Remove Category Above Post Title

For me it doesn’t look good when I see category above post title. I admit it has some utility for user, it is much easier to see which category belongs the post, but we kinda confusing for SEO, it’s an extra word instead of post title. Therefore we have to remove it, and visitors can choose categories from the menu. This is what I mean:

Removing Category Above Post Title
Category Above Title

This method applies to twentyfourteen theme and probably several others. Many theme developers remove category above post title by default.

METHOD 1: We modify theme’s code so that we don’t make unnecessary requests to database. The file you’re looking for are: content.php , content-aside.php , content-audio.php , content-featured-post.php , content-gallery.php , content-image.php , content-link.php , content-quote.php , content-video.php in public_html/wp-content/themes/twentyfourteen. There are so many because we’ll remove category for each post type.

In these files you’ll find this line of code, or similar to other themes:

Delete or comment until it becames:

Explanation:
The first line check if the post belongs to a category (besides the usual default)
Lines 2-4 show the actual category above post
Lines 5-6 Closes the if statement required to find the category
I left the php syntax open because the next line is in php.

That’s it. Now you can upload the modified files and the category will not show up again above post title. I removed them also from css because I fail to see the importance of leaving them. It’s an additional line of code that needs to be loaded.

METHOD 2: We leave the code, and modify only the css.The file you are looking for is style.css in public_html/wp-content/themes/twentyfourteen
There are 2 lines of code that needs to be modified:

and

We modify them as:

and

Or we can delete them.

The best method from my point of view is method 1 with removing those lines from css file, but only if you’re sure that they are not used somewhere else. In this way you avoid additional queries and unnecessary lines loaded.

For other themes, it might not be exactly the same lines of code to be modified, try to do a backup before any changes. Also if you don’t have these files in your theme, you can try to do a search in your theme files for “cat-links”. A very nice program that will let you search in files is Notepad ++

Last modified: December 17, 2014