hi there,
is there a shortcode or widget available with this plugin to show just the search bar?
many thanks.
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/
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).
Thank for your interesting in our product, we will discuss this option in the next version.
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?
I know what you want. However, It’s very hard to custom code, we will discuss about it.
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:
Step4: Put shortcode in widget
Result:
Thank for your help and code. I appreciate it.
Please login or Register to submit your answer