Showing or Hiding the Author and Categories in WordPress

Many times when using a new or different theme for wordpress, the showing of each of your post doesn’t completely display how you would like. An example, after upgrading to WordPress2.1 my theme had a couple problems, so I added a new theme. Problem was, with the new theme each of my post didn’t show the Author of the post and it did show the Categories, I wanted it the opposite.

Hiding or showing post author:
If you are wanting to show author or hide author on you post there are 3 places to look.

  • home.php
  • main index template (index.php)
  • single post (single.php)

In each of the files under Presentation –> Theme Editor look for the code (or add the code):

Posted by <?php the_author(); ?>

I’ve added the “Posted by” so the author name isn’t just shown with out a reason for being there. Again, if you want to hide the author for each post, find that code and delete it. (Always backup, even if it’s just copying the entire code to notepad, you’ll have a backup incase it looks incorrect)

Click more for Category code


Hiding or showing the category list

This is the same as above, if you are wanting to show the category list or hide the category list on you post there are 3 places to look.

  • home.php
  • main index template (index.php)
  • single post (single.php)

In each of the files under Presentation –> Theme Editor look for the code (or add the code):

<?php the_category(',') ?>

Again, if you want to hide the category list for each post, find that code and delete it. (Always backup, even if it’s just copying the entire code to notepad, you’ll have a backup incase it looks incorrect)

Technorati Tags:

     

3 Comments to “Showing or Hiding the Author and Categories in WordPress”

  1. Koque 2 February 2010 at 1:03 am #

    Very useful, thanks!

  2. word 25 April 2010 at 4:19 pm #

    Text is running all off the page, but the good news is you’re number 1 for the search term ‘hide wordpress author’ – I bet you have a high bounce rate.

  3. O.C. Search Consulting 3 April 2012 at 4:36 pm #

    Is there a plugin that does this? The reason why I ask is you don’t want to always be hacking your WordPress files if you’re going to do updates. Plugins are a nice way to solve this problem (or make it more manageable)….


Leave a Reply