Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jagreen

    (@jagreen)

    Ah ha! I have an additional style sheet in my theme called “basic.css” and there was a code in there that was very specific with regard to the style of the button. Thanks for your help!

    Thread Starter jagreen

    (@jagreen)

    That’s what I thought, too. When I tried the code you gave me initially, I put in #s in instead of something else (since it already has this id), and it didn’t change a thing. I tried it again just to be sure.

    Sorry to keep bringing this one up, and I appreciate the responses. Other ideas? Should I email the theme creator?

    Thread Starter jagreen

    (@jagreen)

    That sounds simple, but I’m not sure where to put the first code you listed. Here is my searchform.php:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <?php if (strlen(get_search_query()) > 0) { ?>
    	<input type="text" onfocus="if (this.value == '<?php the_search_query(); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php the_search_query(); ?>';}" value="<?php the_search_query(); ?>" name="s" id="s" />
    <?php } else { ?>
    	<input type="text" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" value="Search" name="s" id="s" />
    <?php } ?>
    
    </form>
    Thread Starter jagreen

    (@jagreen)

    ok fixed it

    Thread Starter jagreen

    (@jagreen)

    Beautiful! Thanks so much for your help!

    Thread Starter jagreen

    (@jagreen)

    Still having trouble. Are you saying I should copy and paste the code from search.php into the searchform.php code in my theme? Either way, search.php in the default theme doesn’t seem to contain that piece of code either. It looks like this:

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : ?>
    
    		<h2 class="pagetitle">Search Results</h2>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post">
    				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    				<small><?php the_time('l, F jS, Y') ?></small>
    
    				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">No posts found. Try a different search?</h2>
    		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    My searchform.php looks like this:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <?php if (strlen(get_search_query()) > 0) { ?>
    	<input type="text" onfocus="if (this.value == '<?php the_search_query(); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php the_search_query(); ?>';}" value="<?php the_search_query(); ?>" name="s" id="s" />
    <?php } else { ?>
    	<input type="text" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" value="Search" name="s" id="s" />
    <?php } ?>
    
    </form>

    The code i’ve copied and pasted into a text widget (since I like the disappearing text in the text box) is this:

    <form name=form1 method="get" action="http://timeforjazz.com/">
    <input type="text" name="s" id="s" size="32" class="searchform-textbox" value="Type & Hit Enter to Search" onclick="document.form1.s.value ='';">
    </form>

    What I want is for the search results to come back with excerpts (like I was using a search engine) and not just the whole pages/posts stacked on top of one another.

    Thread Starter jagreen

    (@jagreen)

    Thanks, uwiuw. My theme’s search file is searchform.php, but it does not contain this piece of code. Other ideas? Or another place I could find this part of the code?

Viewing 7 replies - 1 through 7 (of 7 total)