overiding custom_search-result.tpl.php

Created on 19 May 2011, over 14 years ago
Updated 9 May 2025, 5 months ago

First of all thanks for a great module.

I am trying to theme the custom_search-result.tpl.php i.e. I have disabled most of the additional info apart from date on the search results page and would simply like to insert 'Posted by' before the date.

I have copied the custom_search-result.tpl.php file to my theme directory and inserted posted into the template file so it now reads:

<dt class="title">some test
  <a href="<?php print $url; ?>"><?php print $title; ?></a>
</dt>
<dd>
  <?php if ($snippet) : ?>
    <p class="search-snippet"><?php print $snippet; ?></p>
  <?php endif; ?>
  <?php if ($info) : ?>
  <p class="search-info">Posted: <?php print $info; ?></p>
  <?php endif; ?>
</dd>

I have tried refreshing the theme registry by clearing the cache etc and ave even tried moving the custom_search module from sites/all to sites/mydomain for the specific site (multisite install)

Therefore, I would like to ask what if anything I am doing wrong as there does not seem to be any change to the output etc of my site on the search results page. I am assuming but can you confirm that it is possible to use this technique to override the existing custom_search-result.tpl.php file?

πŸ’¬ Support request
Status

Closed: outdated

Version

1.0

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom 2dareis2do

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024