Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ajay

    (@ajay)

    There is no shortcode right now for the form, but that is definitely a good feature to add in the next version of the plugin.

    Right now you need to use get_bsearch_form to pull in the search form.

    Thread Starter mikehaceman

    (@mikehaceman)

    I tried to add to my functions this code:

    // addd [bsearch] shortcode for better-search
    
    function bcs_search_shortcode( ) {
        get_bsearch_form( );
    }
    add_shortcode( 'bsearch', 'bcs_search_shortcode' );

    But it doesnt work. Any help?
    Thanks

    Plugin Author Ajay

    (@ajay)

    I’d probably use bsearch_form rather than just bsearch but what are you seeing when you use this?

    // addd [bsearch_form] shortcode for better-search
    
    function bcs_search_shortcode( $atts ) {
        return get_bsearch_form( '' );
    }
    add_shortcode( 'bsearch_form', 'bcs_search_shortcode' );
    Thread Starter mikehaceman

    (@mikehaceman)

    Works perfectly !

    Maybe for future release just add this as standard function!

    Thanks Ajay!

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

The topic ‘short code for better search?’ is closed to new replies.