Last updated June 7, 2014. Created on February 25, 2011.
Edited by acabouet, ar-jan, brankoc, tax14. Log in to edit this page.

When you create an article or page in Drupal 7, by default, it displays Author and Date information after the title, something like:

published by admin on Thu, 02/17/2011 - 11:08

If you don't want to see this information, disable the Display Settings option for the corresponding content type with these steps:

1. Log-in as Admin and choose Structure, Content types and click edit (under Operations) for the corresponding content type (e.g. Article).
2. Click Display Settings and un-check Display author and date information check box.
3. Save settings by clicking the Save Content Type button.

Now, the author and date information will not be displayed for the corresponding content type.

How about if you want to display the date information but not the author information, e.g. you want to see something like:

Posted: February 23, 2011

To accomplish this,

1. Enable Display Settings for the corresponding content type.
2. Edit the node.tpl.php file of the corresponding theme you are using, e.g. themes\bartik\templates\node.tpl.php and located the following command:
print $submitted;

3. Now replace this command with the following code:
// print $submitted;
if ($submitted) {
echo "Posted: " . date( "F j, Y",$node->created);

4. Save the file and you should see the submitted information in the desired format. Of course, you can use a different date format or add additional node details.


Modules that let you perform the operations above without programming skills:

  • Display Suite provides separate display options for node Author and Date, under the Manage display settings of a content type
  • Submitted By (the D7 version is under development, but is already usable - check the Issue list for known quirks)

Looking for support? Visit the forums, or join #drupal-support in IRC.


juansaab’s picture

If you need to format the dates with an specific language you can't use the format_date function provided by Drupal. (

In my case I use a code likes:

format_date($node->created, $type = 'medium', $format = 'F j - Y', $timezone = NULL, $langcode = 'es')

I hope that it will be helpful for developers in Latam or other countries.

renesmee’s picture

After i am adding some content and in authoring information adding time , it automatically sets to am.. i want to have it in pm, manually.. can you plz help??

duellj’s picture

Another option is to use hook_preprocess_node in your template.php file:

THEME_preprocess_node(&$variables) {
  if ($variables['submitted']) {
    $variables['submitted'] = t('Posted: !datetime', array( '!datetime' => format_date($variables['node']->created, 'custom', 'F j, Y')));

This provides a much cleaner override of the submitted variable for nodes.

petednz’s picture

Wondering aloud - why doesn't "display settings" have two check boxes - one for Author and one for Date - after all they start off as two fields.

peter davis : fuzion : connect.campaign.communicate :

jlyon’s picture

+1. Also seems like these checkboxes should be on the Manage Display page (admin/structure/types/manage/page/display) instead of the Edit page.

RaspberryBlack’s picture

Yes, on the manage display page and as two separate checkboxes and with a dropdown to select the different formats please, that would make way more sense and be really flexible.

mejpark’s picture

Agreed. It seems nonsensical to combine these fields.

attila_fabian’s picture

it would be a nice usability improvement

RaspberryBlack’s picture

btw I just came across the Display Suite module which changes the "manage display" page to allow exactly for that and moving title, links, comments and way more useful features like changing/resetting field and views templates, linking between displays, dynamic & block fields, moving fields to a block just to name a few. Imho could replace views in those cases where you mainly use views to have more control over the output...

trante’s picture

Thank you for information :)

ressa’s picture

I had DS installed anyway, and by doing it via Display Suite I don't have to hack any templates, awesome.

Try Drupal 8 at

corbin’s picture

Can i ask what the code would be to get author only instead of date ?

something like that, i presume :

if ($submitted) {
echo "Author: " . ???( "???",$node->created);

but what about "???"


corbin’s picture

i answer to myself : there is nothing easier ... when you are using another language !!!

you go in site building / translate interface / search
and you search :
string contains : -->"Posted*" (* the translated term in the other language you use)
in "Built-in interface" you find your text
you edit and you find :
"Submitted by !username on @datetime" (translated)
you suppress the one you don't want anymore, register : it's ready !


edd.o’s picture

Hey there!

I don't understand how I can change that for a specific custom content type. What's the corresponding file name? Let's say my content type is called "mynews".


edd.o’s picture

I did it with CSS by using a new style for the content type's class. I tried Display Suite but couldn't find a the place to configure the author/date for my custom content type. Anyway, maybe I'll try it later with Panels...

Fr0s7’s picture

In your theme, you need to make a copy of node.tpl.php. Then rename this file node--your-content-type-machine-name.tpl.php. So in your case, the new file would be named node--mynews.tpl.php.

hargobind’s picture

Here's a detailed explanation of customizing the "Submitted by [name] on [date]" string.

There are two places you can modify this string:
1 ) Inside of template.php in your theme, edit (or add) the following function:

function THEMENAME_preprocess_node(&$variables) {
  $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));

Or you can modify node.tpl.php and change the $submitted variable:

  $submitted = t('Submitted by !username on !datetime', array('!username' => $name, '!datetime' => $date));

You can customize those parts to change the wording "Submitted by", or only display the username or date. The following examples are using the template.php approach. For the node.tpl.php format, you would change $variables['myvariablename'] to $myvariablename.

If you only want the username:

  $variables['submitted'] = t('Submitted by !username', array('!username' => $variables['name']));

And only the date:

  $variables['submitted'] = t('Submitted on !datetime', array('!datetime' => $variables['date']));

(and of course you can change the string "Submitted on" to whatever you like.)

To customize the date format, the recommended solution is to use one of the predefined formats under Configuration > Regional and Language > Date and Time (Drupal 7.x) or Site Configuration > Date and Time (Drupal 6.x). Once this is done, you can then use those predefined formats in your code with format_date(). Refer to the Drupal API for full details on the format_date() function.

To use one of the formats that you set up above:

  $variables['date'] = format_date($variables['node']->created, 'format_type');
  // Where 'format_type' is one of: 'long', 'medium' or 'short'

You can also use 'custom' as the format type, and specify your own format in the third parameter:

  $variables['date'] = format_date($variables['node']->created, 'custom', 'F j, Y');

The third parameter is a combination of date parts. You can view a full list here: or

anou’s picture

A little error has made her way thru copy&paste functionality:

  $variables['date'] = format_date($variables['node']->created, 'format_type');
  // Where 'format_type' is one of: 'long', 'medium' or 'short'

only 1 parenthesis at the end...
But still a big thank to @hargobind for the detailed explanation !


eskpetri’s picture

I edited the theme template.php (just to remind me) from drupal root ./sites/all/themes/"theme name"/

I added selfcreated time format named suomilyhyt using Drupal 7 admin panels as noted before

// Muokataan päiväformaatti vastaamaan suomi asetuksia.
$variables['date'] = format_date($variables['node']->created, 'suomilyhyt');

// Add pubdate to submitted variable.
$variables['pubdate'] = 'created, 'custom', 'c') . '">' . $variables['date'] . '';
if ($variables['display_submitted']) {
$variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['pubdate']));

Worked for me just fine. I am a little bit rust on php and so on. I am not sure about possible error handling if variable date is not set but I have to start learning from some where.

Thanks a lot for solution. :)

Crentas’s picture

There is a MUCH easier way to do this. After searching for days and 2 bottles of Excedrin, one VERY simple solution is to simply reset the display for the comments. Then you can enable the field for the submitted by and position it above the comment field. You also have the option of hiding the label so that it doesn't show the Submitted by, unless you want to see it of course. There are a lot of other fields that you can add as well. It's all a matter of choosing which fields match your criteria.

karolus’s picture

By adding this (posted above) to my theme's template.php file, it worked (removed the author information):

function mytheme(&$variables) {
$variables['submitted'] = t('Posted on !datetime', array('!datetime' => 

But, if I tried to add anything to the node.tpl.php, no author/date would display, even if I left the file blank. Flushing the caches and running cron had no effect on the information removal. Only way I got it back was by removing the node.tpl.php file from the theme folder.

leanne9’s picture

So glad it was this easy! :D Thanks a bunch

dstanley333’s picture

How to Control/Modify Display Settings (Author and Date Information) on Posts

Does anyone know how to do this in Drupal 6?

anou’s picture

You can use the MYTHEMENAME_preprocess_node function in template.php also in drupal 6. Maybe the way to alter the $variables['submitted'] will be slightly different.


tgldesign’s picture

I just made a views block containing a post date field, and put a node id contextual filter on it so it prints the date of each page. Here is my view:

$view = new view();
$view->name = 'post_date';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'post date';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '1';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Post date */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'node';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['label'] = '';
$handler->display->display_options['fields']['created']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['created']['date_format'] = 'long';
/* Contextual filter: Content: Nid */
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
$handler->display->display_options['arguments']['nid']['table'] = 'node';
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
$handler->display->display_options['arguments']['nid']['default_action'] = 'default';
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
$handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['nid']['specify_validation'] = TRUE;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'page' => 'page',
  'product' => 'product',

/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
BeatnikDude’s picture

  • The default node display for the date is the "Medium" format, found here: ./admin/config/regional/date-time
  • Add your own date format ("l, F jS, Y" for "Wednesday, January 8th, 2014") here: ./admin/config/regional/date-time/formats
  • Then change the "Medium" format to your newly created one.
iainH’s picture

Many thanks @BeatnikDude. So simple after all!

owenpm3’s picture

Making the change to the article content type was awesome and easy. The post date displays like a champ--thanks.