Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal 7 change Submitted by format

I'm new to drupal but learning quickly. I've got drupal 7 and I'm working on creating a theme based on Zen's starterkit sub-theme. I'm trying to find where I can customize the "Submitted by" line.

The default looks like this:

Submitted by kenny on Sun, 05/13/2012 - 18:33

I'd like to change it so it simply says the date in a nice format (no user name, no time).

Sunday, May 13th, 2012

How and where can I change this?

like image 692
Kenny Wyland Avatar asked May 14 '12 22:05

Kenny Wyland


1 Answers

In your template.php file (of the Zen sub theme), put this.

function mytheme_preprocess_node(&$vars, $hook) {
$vars['submitted'] = date("l, M jS, Y", $vars['created']);
}
like image 137
AKS Avatar answered Nov 14 '22 20:11

AKS