I have installed Custom Search module for my drupal7 setup.

I am trying to modify template files for search-result and search-results.

By default its using template files from contrib module's theme itself which are as follows:


As per the theme-debug's hook suggestions I have created tpl files and have placed them within my sub-theme's templates directory, which are as follows:


I have cleared cache for several times, and still it uses template files from the module's theme directory.

Can anyone please help me out with this issue.

Thanks in advance.

enter image description here

  • Your templates have all dashes whereas the module's templates have an underscore and a dash, e.g. custom_search-result.tpl.php (which seems odd) but I am guessing you need to copy these verbatim. Commented May 22, 2020 at 17:30
  • @danny-englander I have tried it, but it did not work.
    – Vik Durve
    Commented May 26, 2020 at 10:53
  • 1
    Yes, I have cleared cache using both drush and from admin UI (/admin/config/development/performance)
    – Vik Durve
    Commented May 27, 2020 at 11:47
  • 1
    This looks like it's a known issue, see this for more info with solutions. drupal.org/project/custom_search/issues/1162604 Commented May 28, 2020 at 11:54
  • 1
    @danny-englander had to use search-result.tpl.php
    – Vik Durve
    Commented May 29, 2020 at 17:31

1 Answer 1


This is a known issue with the Custom Search module for Drupal 7. Of note from the issue:

Copy custom_search/theme/custom_search-result.tpl.php to your theme location (e.g, sites/themes//templates/search-result.tpl.php), modify accordingly and then refresh your caches.

Tested on the current stable - custom_search 7.x-1.11

The solution is to rename custom_search-result.tpl.php from the module to search-result.tpl.php in your theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.