This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

add ajax field onto the page

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5907
    Dominik LechnerDominik 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

    [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>

    [/code]

    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 LechnerDominik 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>
    [/php]

    #5920
    Ernest MarcinkoErnest 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:

    [code]<div id="search-form-recipes">
    <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>
    </div>[/code]

    #5932
    Dominik LechnerDominik 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 MarcinkoErnest 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.