This is what we have. It's a simple bit of html that is used on the page
where you want the search box to be.
You have to change opacbaseurl for your own. Let me know if it works :)
<form name="searchform" method="get"
action="https://opacbaseurl/cgi-bin/koha/opac-search.pl" id="searchform">
<input id="transl1" name="q" type="text"><p>
<select name="idx" id="masthead_search">
<option value="kw">Keyword</option>
<option value="ti">Title</option>
<option value="au">Author</option>
<option value="su">Subject</option>
<option value="nb">ISBN</option>
<option value="se">Series</option>
<option value="callnum">Call number</option>
</select>
<input value="Search" id="searchsubmit" type="submit"></p>
</form>
On 19-08-30 09 h 02, Owen Leonard wrote:
Does anyone have any code for creating a single search box on a Word
Press site that can switch between "Search our website" and "Search our
catalog?"
This is what we have in our modified Wordpress template
(https://www.myacpl.org/):
https://gitlab.com/snippets/1890638
The <script> section is actually in a different file, but GitLab
doesn't support multiple "files" in a snippet.
The HTML is from the modified Wordpress template, so you can see that
it calls the Wordpress search form directly:
<?php get_search_form(); ?>
Please let me know if I can provide more details.
-- Owen
--
Caroline Cyr La Rose, M.L.I.S.
Librarian | Product Manager
Phone: 1-833-465-4276, ext. 221
caroline.cyr-la-r...@inlibro.com <mailto:caroline.cyr-la-r...@inlibro.com>
INLiBRO | Document Technologies Specialists | www.inLibro.com
<http://www.inLibro.com>
_______________________________________________
Koha mailing list http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha