Removing the date from your theme
Good question today. There are a number of reasons to want to remove the date from your posts and this question was asked by a good on line friend. (Amazing how on line you can have friends that you have never met face to face and still feel you know them from their blogs, Twitter and Facebook.) The topic of when to remove a date just might make a good discussion for the future. I love when answering one thing gives me another topic to talk about. Now to write it down before I forget it
. The comment with the question is below.
I just read some information about increasing your site SEO keywords by making a keyword statement in your footer. For example, If you are selling horse pellets (keyword) then you would write something like “Make your horse happy! Horse pellets do the trick.â€
So this comes just in time I will be giving this a try.
Now teach us how to take the date off of our sites.
Now the first thing is that different themes will have to be dealt with differently. Some of the newer themes that take advantage of all the added features in WordPress are structured differently. Quite a few of the premium themes make this tough for the same reasons.
The following will work for most of the older themes like the one I am using here – Flexibility.
There are two files that need to be edited – index.php and single.php.
To do this (only after taking care of the step in the warning above) you can either edit the theme in your favorite editor or do it from the dashboard. To access the dashboard go to appearance – editor.

Then click on each file in the right sidebar.

When you open the file you will have to look for something that looks like date, time, etc as a php call. On this theme it is called the_time and is highlighted below.

Remove that whole line and save the file. Make sure to remove if from opening brace < to closing brace >.
You will need to do the same thing with single.php.

Now not all themes have this type of code as I mentioned when we started. For example, if look at the Twenty Ten theme the main index page will pull something different.

This time to display the whole post it is calling on a different php file. Unlike the other theme’s files there is no easily discernable items like title, date or time. You will need to dig deeper.
Now I did that with this theme and found that trying to edit the files was creating problems in the display of every thing including the admin area. (Boy was I glad I had a back up
)
So I went looking for an answer and I was not the only one that had the problem. When I went to the theme page on the codex there was a little section on the right sidebar that said “What people are saying”. I clicked that and found an easy fix as it led me to the posts in the WordPress help forum on that theme. Actually there was more than one but this was by far the simplest.
You can remove that portion from your blog display through adding a single line of code in the style sheet. This time all you need is to go to the editor as mentioned before and select the file style.css.
This is what I use and it is literally the last line of code in your Stylesheet (style.css)
}.entry-meta{display:none;}

It worked on my test blog fine.
With the more complicated themes that take advantage of the new features in WordPress it becomes harder to find things as the amount of code can be mind boggling.
That is one of the benefits of using a premium theme that has support and one of the reasons that I recommend Woo Themes. Support is becoming more and more necessary even for little fixes that used to be simple as themes grow in complexity.
Very much like what has happened with automobiles. They used to be easy to fix and tune up. Now they have become so complex you need a computer and special tools just to diagnose a problem.
Hope this helps and your questions and comments are welcomed.
About the author
|
Mike Paetzold got started blogging in 2003 and has become an expert on using WordPress. He has become known as The WordPress Guy. After being an under ground niche marketer using his blogs he has surfaced to share some of the ways he uses blogs to enter various niches profitably. If you would like help in building your business check out my coaching offer. |
Tagged with: appearance • date time • edit theme • remove date form theme • wordpress
Filed under: questions
Like this post? Subscribe to my RSS feed and get loads more!





Leave a Reply