Customize search results


/ Published in: PHP
Save to your folder(s)

Allows to customize the search results page.


Copy this code and paste it in your HTML
  1. <?php
  2. /**
  3. * Theme override for search results.
  4. *
  5. * Replace themename with your theme's name.
  6. */
  7. function themename_search_item($item, $type) {
  8. $output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt>';
  9. $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] .'</p>' : '');
  10. return $output;
  11. }
  12. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.