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 8 years, 2 months ago.
- AuthorPosts
- September 12, 2015 at 9:07 pm #5907
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
September 12, 2015 at 9:08 pm #5908<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>
-
This reply was modified 8 years, 2 months ago by
Dominik Lechner.
September 14, 2015 at 11:01 am #5920Hi!
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:
Best,<div id="search-form-recipes"> <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?> </div>
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 14, 2015 at 3:19 pm #5932thanks we will try it… Is here a way to receive a result like google just a automatic suggestion? without images?
September 16, 2015 at 9:41 am #5947Hi!
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.
Best,
To disable the description, author etc.. go to the Layout Options -> Results Layout panel.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This reply was modified 8 years, 2 months ago by
- AuthorPosts
You must be logged in to reply to this topic.