One of the things everyone is stressing to me as a relatively new Drupal Developer is to NEVER modify the core.

I installed a theme on a site, but do not want the "Submitted by Joe Smith on Friday September 17" lines to appear.

I could not find the "submitted by" field as an option under "Manage Display" to move it to hidden for the default article type. All I saw were "Image" "Body" and "Tags" fields. I successfully hid the "Tags" field by dragging it to the "Hidden" area of "Manage Display".

I was able to find the code that writes the "Submitted by..." text in the node.tpl.php file that was part of the theme so I deleted the following three lines which accomplished my goal.

<?php if ($display_submitted): ?>
          <p class="submitted"><?php print $submitted; ?></p>
<?php endif; ?>

My question: is this OK or is changing a theme this way considered changing the "core"? If it is changing the core, what would be the correct way to remote the "Submitted by" information from a page if it is not exposed as a field on the form?



Jaypan’s picture

1) You should never hack core, and this includes core themes. Any changes you make will be overwritten in your next update. If you need to make a change in a theme, make a sub-theme based on the theme, and make your changes in the sub theme.

2) You can turn off the setting you want in the Appearance -> Settings page.

jsruzicka’s picture

Tried settings, and it didn't work. There are only options for hiding
Site name
Site slogan
User pictures in posts
User pictures in comments
User verification status in comments
Shortcut icon

I will explore the sub-theme option, though, since this is the proper way to do it.

nevets’s picture

In D7 its a per content type setting (in the vertical tabs)

jsruzicka’s picture

Ah, thanks. Right before my eyes. I kept going to "Manage Display". Will never forget it now.

In six months these n00b postings are going to come back and haunt me :)

iwant2fly’s picture

No they will just remind you how far you have come. :)