Skip to content

Instantly share code, notes, and snippets.

@sergiu-radu
Created March 25, 2021 09:40
Show Gist options
  • Save sergiu-radu/e5404948d6b018d9ec3766c5fb680611 to your computer and use it in GitHub Desktop.
Save sergiu-radu/e5404948d6b018d9ec3766c5fb680611 to your computer and use it in GitHub Desktop.
Search shortcode (with live results)
// 1. Add this code in your functions.php file
add_shortcode('wpbsearch', 'get_search_form');
// 2. Call the shortcode wherever you want like this:
[wpbsearch]
@webhouse-dev
Copy link

How to limit that to posts only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment