is there a shortcode or widget available with this plugin to show just the search bar?
AT the moment, the plugin does not support the search shortcode as you want. In this case, you can use the third party plugin.
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).
+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?
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’] ) : ” ?>”>
<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:
Step4: Put shortcode in widget
Please login or Register to submit your answer