merfill59
asked 8 years ago

hi there,
is there a shortcode or widget available with this plugin to show just the search bar?
many thanks.

4 Answers
DominicStaff
answered 8 years ago

AT the moment, the plugin does not support the search shortcode as you want. In this case, you can use the third party plugin.
https://wordpress.org/plugins/eps-super-search/

merfill59
answered 8 years ago

thanks for the reply.
do you have any plans to implement this?
i’d rather not use a third party plugin (especially since your linked one has not been updated in over 2 years).

Dominic Staff
replied 8 years ago

Thank for your interesting in our product, we will discuss this option in the next version.

gcez
answered 8 years ago

Hi.
+1 on this request. In the meanwhile, can you please let me know if there is .php code that can be used to render the Search box?

Dominic Staff
replied 8 years ago

I know what you want. However, It’s very hard to custom code, we will discuss about it.

azghanvi
answered 7 years ago

Here is my solution for shortcode. It will only run search with autocomplete lookup in sidebar and on single question page. (hide on homepage)
Step1: Install plugin : https://wordpress.org/plugins/add-actions-and-filters/
Step2: Paste this Search form html code

if( is_single() && ‘dwqa-question’ == get_post_type() )
{
?>
    <form id=”dwqa-search” class=”dwqa-search”>
        <input data-nonce=”<?php echo wp_create_nonce( ‘_dwqa_filter_nonce’ ) ?>” type=”text” placeholder=”<?php _e( ‘What do you want to know?’, ‘dwqa’ ); ?>” name=”qs” value=”<?php echo isset( $_GET[‘qs’] ) ? esc_html( $_GET[‘qs’] ) : ” ?>”>
    </form>
    <script src=”<?php echo get_site_url() ?>/wp-content/plugins/dw-question-answer/templates/assets/js/dwqa-questions-list.js”></script>
<?php
}

Step3: Install this plugin to run shortcode in widget:

Shortcode Widget


Step4: Put shortcode in widget

Result:

Dominic Staff
replied 7 years ago

Thank for your help and code. I appreciate it.

Powered by DW Question & Answer Pro