add ajax field onto the page

Home Forums Product Support Forums Ajax Search Pro for WordPress Support add ajax field onto the page

This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 8 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5907
    Dominik Lechner
    Dominik Lechner
    Participant

    hi i would like to add the field onto the site http://www.eis-selber-machen.com/rezepte/ but i have here the existing search fielt without your tool… Now, i would like to add here in the same style your plugin. I have add onto the code

    	<div id="search-form-recipes">
    			<form role="search" method="get" id="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    			    <input type="text" name="s" placeholder="<?php echo esc_attr_x( 'Suche hier alle', 'progression' ); ?> <?php $count_posts = wp_count_posts('recipe'); echo $count_posts->publish; ?> <?php echo esc_attr_x( 'Rezepte', 'progression' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>"/>
    			    <input type="hidden" name="post_type" value="recipe" /> <!-- // hidden 'products' value -->
    			    <input type="submit" value="Los" id="search-recipes-btn" />
    				<div class="clearfix"></div>
    
    
    
    
    
    			 </form>
    
    		</div>
    
    
    

    Your Code [wpdreams_ajaxsearchpro id=1] but of course this will not work can you please help ? Because that is a php code what i need or?

    Thankjs

    #5908
    Dominik Lechner
    Dominik Lechner
    Participant

    <div id=”search-form-recipes”>
    <form role=”search” method=”get” id=”search-form” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
    <input type=”text” name=”s” placeholder=”<?php echo esc_attr_x( ‘Suche hier alle’, ‘progression’ ); ?> <?php $count_posts = wp_count_posts(‘recipe’); echo $count_posts->publish; ?> <?php echo esc_attr_x( ‘Rezepte’, ‘progression’ ); ?>” value=”<?php echo esc_attr( get_search_query() ); ?>”/>
    <input type=”hidden” name=”post_type” value=”recipe” /> <!– // hidden ‘products’ value –>
    <input type=”submit” value=”Los” id=”search-recipes-btn” />
    <div class=”clearfix”></div>

    </form>

    </div>

    </form>

    </div>

    #5920
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    There is also a PHP shortcode available for each search instance, and a small chapter in the documentation to help you with the implementation to the themes: http://wpdreams.gitbooks.io/ajax-search-pro-documentation/content/getting_started/search_shortcode_in_themes.html

    In your case it’s probably something like this:

    <div id="search-form-recipes">
        <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?>
    </div>
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #5932
    Dominik Lechner
    Dominik Lechner
    Participant

    thanks we will try it… Is here a way to receive a result like google just a automatic suggestion? without images?

    #5947
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    You can disable the description and the images as well, so only the title is visible – that’s as close as it gets to google suggestions.

    To disable the images go to the General Options -> Image Options panel.
    To disable the description, author etc.. go to the Layout Options -> Results Layout panel.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.