asked 3 years ago

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

4 Answers
answered 3 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.

answered 3 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 3 years ago

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

answered 3 years ago

+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 3 years ago

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

answered 3 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 :
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’] ) : ” ?>”>
    <script src=”<?php echo get_site_url() ?>/wp-content/plugins/dw-question-answer/templates/assets/js/dwqa-questions-list.js”></script>

Step3: Install this plugin to run shortcode in widget:

Shortcode Widget

Step4: Put shortcode in widget


Dominic Staff
replied 3 years ago

Thank for your help and code. I appreciate it.

Powered by DW Question & Answer Pro