Site: http://forwashington.net/

On the blog posts on that home page, I've been asked to remove the timestamp from the posts. I'm not sure how to do that, since it doesn't seem to be an option in the Content management menus.

Any ideas how to do that?

Comments

zbricoleur’s picture

Go to admin/build/themes/settings and uncheck blog under the "Display post information on" heading.

chadlupkes’s picture

Hey, thanks so much!

ngreimel’s picture

How would I go about removing that information from the search results page?

Page - admin - 2008-08-10 - 10:10am - 0 comments - 0 attachments

zbricoleur’s picture

I believe you'll have to override the theme_search_item function to do that. Not as simple as unchecking a box in admin/build/themes/settings, but not hard, either.

In the template.php file in your theme (assuming a phptemplate theme), add this function (if there is no template.php file in there, create one):

function phptemplate_search_item($item, $type) {
  $output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt>';
  $info = array();
  if ($item['type']) {
    $info[] = check_plain($item['type']);
  }
  if ($item['user']) {
    $info[] = $item['user'];
  }
  if ($item['date']) {
    $info[] = format_date($item['date'], 'small');
  }
  if (is_array($item['extra'])) {
    $info = array_merge($info, $item['extra']);
  }
  $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] .'</p>' : '')  .'</dd>';
  return $output;
}

For this theme only, Drupal will see this function and use it instead of the theme_search_item function in search.module. This function omits the user info/timestamp stuff. (Compare this function with the one in search.module--it's the next-to-last line that's different.)