Wordpress search


(Chris Hardy) #1

Hi all,

I was wondering if it was possible to put a search box into a hype document that when the user inputs their given search and presses go, it uses that search query and directs them to my Wordpress search results page?

Is there a simple few lines of code that i could paste into a html widget to achieve this?

Thanks you all in advance,




To do this, you would need to make a page template, and include the standard Wordpress search form: https://codex.wordpress.org/Function_Reference/get_search_form

The hard part is getting this setup, and it’s something better asked at the Wordpress.org forums – the easy part is embedding it as the full URL within an HTML widget in Hype.

The alternative is to use something like Google’s site search: https://support.google.com/customsearch/answer/2630969?hl=en


you can actually just put

<?php get_search_form(); ?>

inside of your html widget providing that this widget is being served inside your wordpress site

This assumes you have a search.php file in your theme folder

EDIT** sorry it seems that when exporting HYPE comments out the <?php ?> tag


(Chris Hardy) #4

Thanks for your reply :smile: