Viewing 5 replies - 1 through 5 (of 5 total)
  • Is the theme you are using widget-compatible?

    Thread Starter webtodd

    (@webtodd)

    no, dont think so

    Thread Starter webtodd

    (@webtodd)

    just need the snippet of code for the search box, i think there is something like that, no?

    This is the code from my themes sidebar search:
    <!-- // <label for="s"><?php _e('Search:'); ?></label> --> <br />
    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <div>
    <input type="text" name="s" id="s" size="15" />&nbsp;<input type="submit" value="<?php _e('search'); ?>" />
    </div>
    </form>

    <?php /* If this is a category archive */ if (is_category()) { ?>
    <p class="cmeta">You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>

    <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    <p class="cmeta">You are currently browsing the weblog archives
    for the day <?php the_time('l, F jS, Y'); ?>.</p>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <p class="cmeta">You are currently browsing the weblog archives
    for <?php the_time('F, Y'); ?>.</p>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <p class="cmeta">You are currently browsing the weblog archives
    for the year <?php the_time('Y'); ?>.</p>

    <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    <p class="cmeta">You have searched the weblog archives
    for <strong>'<?php echo wp_specialchars($s); ?>'</strong>.</p>

    <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <p class="cmeta">You are currently browsing the weblog archives.</p>

    <?php } ?>

    My theme uses simply this in the sidebar:

    <li>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    </li>

    This can be used with the Default theme which comes with searchform.php built-in. I don’t know if your theme has it. I can give you the contents of searchform.php if you need that too.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add search box?’ is closed to new replies.