I would like to have two separate search functions. The first is fine how it is, the second, I would like to only search titles. I have tried the code suggested [here](
https://wordpress.stackexchange.com/questions/27407/two-search-boxes-one-only-searches-titles-the-other-searches-all-content), but do not know how to make the function conditional on the hidden value ('by-ref')
in my search form.
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<input type="text" value="" name="s" id="search-text" />
<input type="hidden" name="search-type" value="by-ref" />
<input name="submit" type="submit" value="Go" />
</form>