Add time to WordPress Posts using CommentPress Theme

Recently I had a request to add the time in addition to the date for posts like the comments had.

Edit single.php for the WordPress site that is using CommentPress:

vi wp-content/themes/commentpress/single.php

Change the following line from this:

<p>Posted by <? the_author() ?> on <? the_date(); ?> <?php edit_post_link(‘edit’,”,”); ?> <br />

to

<p>Posted by <? the_author() ?> on <? the_date(); ?> at <? the_time(); ?> <?php edit_post_link(‘edit’,”,”); ?> <br />

Save and close the file and refresh your browser.  This should add the time in addition to the date of the post.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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