Latest News

Removing Add Comment and Read More Links From Drupal

Sunday, October 4, 2009 , Posted by m4solutions at 4:04 PM

How To Remove the "Read More" and "Add Comment" links from Drupal.

In some cases you might not want these links to appear on your blog posts. Here is an easy way of removing them.

1. Navigate to your themes folder
2. Open up node.tpl.php with your favorite text editor
3. Navigate to the section that has this block of code
(?php if ($links): ?)
(div class="links")
(?php print $links; ?)
(/div)
(?php endif; ?)

4. Remove the following line of code "(?php print $links; ?)"
Remember that the parenthesis should be replaced with brackets <>
5. Save the file.

Your blog posts will now appear without the read more and add your comment links.

Note: If you remove the whole block of code, it will also be removing a div tag. This may cause the bottom of one blog posts leaking in to the top of another.

Currently have 0 comments:

Leave a Reply

Post a Comment