Possible Duplicate:
Remove links 'read more' and 'Add new comment ' on the home

I user zen theme and i tried this question answer Remove the 'read more' and 'Add new comment' links on the home page but when i apply it i face server error message. also i study that drupal core doesn't have a setting to disable read more link.

So, How can i remove read more link from front page on zen them?

  • I updated the snippet in the other question, no need to create a new one... – Berdir May 12 '11 at 12:50
  • @Berdir I tried the edited one but the same error – jone May 12 '11 at 12:53
  • @Berdir Now i did like this: function STARTERKIT_preprocess_node(&$variables) { if ($variables['is_front']) { unset($variables['content']['links']); } } and i cleared the cache. the the page is come up but nothing is changed i still see the read more links. – jone May 12 '11 at 13:06

The problem is in the node rendering, not the page rendering. Its a lower/smaller level than the preprocess page. You can use node template overrides such as "node-fonts.tpl.php" where "fonts" is the name of the node type. You will copy "node.tpl.php" to make this then modify it to your liking. This template is found in "[SITE ROOT]/modules/node/". Copy this to your theme folder. When I do this I create a subfolder called "node" to help organize the theme overrides.

If you want an easier solution then I would use ConTemplate (otherwise known as Content Template). This will allow you to control this from the content type admin config (creates a template tab which has options for the teaser and the full node). This also provides details about the available variables and sample data from the last inserted node of the type you are looking at.

  • @user1094 like you said i copid nod.tpl.php and i removed hide($content['comments']); hide($content['links']); print render($content); i have know idea about php but i guess this one is for read more links. but nothing is changed the read more link still there. could you tell me what to do step-by-step please. I'm using zen theme – jone May 13 '11 at 7:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.