For some reasons you may want to remove date from posts but if you remove date from posts like news article and announcements then it will lead confusion to your readers. So you may like to remove post dates from particular category only. For example, Lets say you have a category for tutorials which are timeless contents, So you don’t want to show date on them.
Here is a little trick you can implement on Genesis Framework by which the dates will be shown only to category you have mentioned.
First you need to find category ID’s of the category you want to remove dates. Here is a tutorial to find Category ID on WordPress.
Paste the following code at the end of your Genesis Child Theme’s
functions.php file (exclude
<?php tag at the beginning)
In above code change
cat-2 with the category id’s you found previously.
The above code excludes date and outputs author name with link and comments count for posts inside categories mentioned.
Posts from other categories will be having date in post info. If you want to remove date on single category only then remove the second category id from the code.
You may want to remove date from all category but except few. In that case use the following code.
Above code removes date from all the categories except the posts in category mentioned. This is a inverse function of first code.