WordPress.org

Ready to get started?Download WordPress

Forums

the search is not working (2 posts)

  1. dagash
    Member
    Posted 2 years ago #

    i am working on designing my first theme , and i got problem with search .
    my problems are :
    1- i need to execute the search by clicking a search image .
    how can i use an image instead of submit button ..?

    2- i use this code in searchform.php
    this is searchform.php :

    <div id="searchbar">
    			<form method="get" id="searchform" action="<?php bloginfo('url'); ?>">
    				<input type="text" name="searchbar" value="<?php the_search_query(); ?>" id="searchbox" />
    				<!-- <input type="submit" name="submit" value=" " id="button" />  -->  <!-- submit bottun -->
    			</div><!--END searchbar-->
    			<div id="searchicon">
    				<img src="<?php bloginfo('template_directory'); ?>/images/Search.png" alt="ابحث" />
    			</form>
    			</div>

    this is a snippet of header :

    <div id="headerbar"><!--headerbar includes ( search bar ) -->
    		<?php include(TEMPLATEPATH . '/searchform.php'); ?>
    
    		</div><!--END headerbar-->

    also when i use above codes , the search form is not working ( not finding specific post that contain the search word ) .
    look at this image :
    the image

  2. dagash
    Member
    Posted 2 years ago #

    also how can protect my input search ..?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.