Show/hide 'Submitted by' on posts

Last modified: December 4, 2008 - 20:35

Set appropriate post information for your site.

In (Administer > Site building > themes), select the "Configure" tab, then "Global settings." Select the appropriate "Display post information on" settings that are right for your site.

Available options will be determined by the installed modules on your site. Other options can be configured on the individual theme's configuration page.

question

dredot - October 13, 2009 - 19:41

what about themes that aren't affected by this setting?

How do we enable the setting to take effect on the contributed themes without having to hard-code the displaying line to a comment i.e. "// or /* */"

answer

calexo - December 7, 2009 - 15:00

You can add :

<?php
if ($submitted):
?>

Hard coded "Submitted by..."
<?php
endif;
?>

If you want to be fully standard, replace the hard coded part by :

<?php
print $submitted;
?>

You can then use submitted_by module to customize it.

Calexo
http://www.calexo.net/

 
 

Drupal is a registered trademark of Dries Buytaert.