WP Extended Search Shortcode

Below, you’ll find a detailed guide on how to add the WP Extended Search Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the WP Extended Search Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the WP Extended Search Plugin and the shortcodes it provides:

Plugin Icon
WP Extended Search

"WP Extended Search is a versatile WordPress plugin that enhances your website's default search mechanism. It offers advanced search options and improves search results for better user experience."

★★★★☆ (65) Active Installs: 20000+ Tested with: 6.2.3 PHP Version: 7.0
Included Shortcodes:
  • [wpes_search_form]

WP Extended Search [wpes_search_form] Shortcode

The WP Extended Search shortcode is designed to register a custom search form. It uses the ‘wpes_search_form’ shortcode to generate a search form with specified attributes. This shortcode accepts parameters (atts) which are then passed to the ‘get_search_form’ function, allowing customization of the form.

Shortcode: [wpes_search_form]

Examples and Usage

Basic example – A simple use case of the shortcode to display the default search form.

[wpes_search_form /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpes_search_form] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'wpes_search_form', array( $this, 'register_search_form_shortcode' ) );

Shortcode PHP function:

function register_search_form_shortcode( $atts ) {
		$atts = shortcode_atts( $this->form_default_args, $atts, 'wpes_search_form' );
		return $this->get_search_form( $atts );
	}

Code file location:

wp-extended-search/wp-extended-search/includes/class-wpes-search-form.php

Conclusion

Now that you’ve learned how to embed the WP Extended Search Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *