I made a custom theme based on Zen. In my custom theme (and under stock Zen theme as well) there is a problem with enabling my search form. When I tick the checkbox that says "search" box under admin>theme>customtheme>config>Toggle Box and click save, the page refreshes and I notice that the checkbox at "search box" is unticked again. Obviously this results in me not being able to show the search form.

Here's the code from my page.tpl.php file.

<?php if ($search_box || $primary_links || $secondary_links || $navbar): ?>
    <div id="navbar"><div id="navbar-inner" class="clear-block region region-navbar">
        <a name="navigation" id="navigation"></a>
        <?php if ($search_box): ?>
           <div id="search-box">
              <?php print $search_box; ?>
           </div> <!-- /#search-box -->
        <?php endif; ?>

Have you updated the theme_settings.php file of your subtheme, along with template.php?

theme_settings.php is where the search box toggle on the the config page is specified, so my guess is that the error is there.

Another quick check, if you edit the settings on the parent Zen theme, do those save and cascade down into the subtheme?

| improve this answer | |

I had the same problem - answer: Search module is not enabled by default! So

  • go to admin/build/modules, scroll down to 'Search' and tick the checkbox.

  • Then go to admin/user/permissions, scroll down to 'Search module' and set permissions for Anonymous and authenticated user (and any other type of users you might have configured and want to give this permission to).

  • Finally, go over to admin/build/themes/settings/[your-theme-name] where you will find that the 'Search box' checkbox is now tickable.

You should now see the search box - if you don't , flush caches!

| improve this answer | |

Is it by any chance the same issue as mentioned in:

| improve this answer | |
  • Not really. In those cases you mention, the search box does appear for a bit and only after having been there it dissapears. My problem is that enabling the search box and saving that configuration doesn't even work to begin with. Of course doens't mean those problems are related so I maybe it's a good idea to start sifting through those cases you mentioned after all. – Immers Sep 16 '11 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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