You are here:  » Add HTML to search results

Support Forum



Add HTML to search results

Submitted by kjw on Wed, 2007-11-21 20:09 in

Hi! I'm having a hard time finding where to put HTML or my site logo to show up on the search results page. I want to put our logo and other info in for search results-don't know where to add it in script?
Thank you! Jennifer

Submitted by support on Thu, 2007-11-22 12:03

Hello Jennifer,

The usual place to add your own logo so that it is displayed on every page is within html/header.php. The search results themselves are displayed by html/searchresults.php, so you could place your own HTML at the top of that file, and as it stands they would be displayed below the green status bar (containing the sort order links etc.).

However, if you want to display custom HTML on specific pages but higher up the page, you can do something like this in html/header.php (add this code at the end):

<?php
switch($_SERVER["PHP_SELF"])
{
  case "/search.php":
    ?>
    // PLACE YOUR CUSTOM HTML FOR THE TOP OF SEARCH RESULT PAGES HERE
    <?php
    break;
}
?>

Hope this helps!
Cheers,
David.