How can I hide the date for a specific custom node that I created. I want to show the author name but hide the data. Toggling the 'submit information' off in the theme hides both of these. Thanks.

Comments

caligari’s picture

You can disable "Display post information on" your content type in "admin/build/themes/settings". May be, you want create your own content type and theme it: http://drupal.org/node/509

rc2020’s picture

hey, did you by chance find a way to hide the date but keep the authoring information? I'm looking to do the same thing.

kalilo’s picture

Im using drupal 6 and still have the same question, can any one help us please?

kalilo’s picture

This thread has more than 3 years and still without answer..is there any thing wrong with the question?

tinny’s picture

in your themes folder (sites/all/themes/yourtheme) create a template.php file if there isnt one there. then add the following code, uncomment the one you want. you can only return one thing:

replace xxx with your theme name


function xxx_node_submitted($node) {
// display the date
	// return format_date($node->created, 'custom', 'd M Y');
// display the authour
	// return $node->name;
// display the authour and link to their profile page
	return l($node->name, "user/$node->uid");
// display authour and date and link name and some other text
	// return t('Posted by ') . l($node->name, "user/$node->uid") . t(' on the ') . format_date($node->created, 'custom', 'd M Y');
}

kalilo’s picture

Hi tinny

Your code works like a charm ! Thanks a lot

kalilo’s picture

How to use this fix this in Drupal 7?
any idea?

dparri’s picture

thank you! It works (drupal 6)