Show search bar and search result on Page
-
Hi,
I would like to show the search bar together with its result on the same page on a Page or Post. I am able to show the search bar itself using short code by adding this on my functions.php :
add_shortcode(‘wpsearch’, ‘get_search_form’);
and putting the short code [wpsearched] to my page or post.
But when i try to use the search bar on the page or post, it will redirect to the default result page of the site. I want to show the result on the same page where the search bar is, which is on the Page/Post.
How can i achieve this if i would use the functions.php or other methods?
Any help is highly appreciated.
Thanks!
- The topic ‘Show search bar and search result on Page’ is closed to new replies.