-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchform-advanced.php
executable file
·24 lines (24 loc) · 1.42 KB
/
searchform-advanced.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
if ( isset( $_REQUEST['post_type'] ) ) {
if ( is_string( $_REQUEST['post_type'] ) ) {
$post_type = array(
$_REQUEST['post_type']
);
} else {
$post_type = $_REQUEST['post_type'];
}
} else {
$post_type = array();
}
?>
<form role="search" method="get" id="searchform" class="searchform" action="/" _lpchecked="1">
<label><span>Search Term:</span> <input type="text" value="<?php print ( isset( $_REQUEST['s'] ) ? htmlspecialchars( $_REQUEST['s'] ) : '' ); ?>" name="s" id="s" placeholder="Search"></label>
<?php if ( is_ripon() ) { ?>
<label><input type="checkbox" name="post_type[]" value="page"<?php print ( in_array( 'page', $post_type ) ? ' checked="yes"' : '' ) ?> /> Pages</label>
<label><input type="checkbox" name="post_type[]" value="post"<?php print ( in_array( 'post', $post_type ) ? ' checked="yes"' : '' ) ?> /> Articles</label>
<label><input type="checkbox" name="post_type[]" value="event"<?php print ( in_array( 'event', $post_type ) ? ' checked="yes"' : '' ) ?> /> Events</label>
<label><input type="checkbox" name="post_type[]" value="people"<?php print ( in_array( 'people', $post_type ) ? ' checked="yes"' : '' ) ?> /> People</label>
<label><input type="checkbox" name="post_type[]" value="guide"<?php print ( in_array( 'guide', $post_type ) ? ' checked="yes"' : '' ) ?> /> Research Guides</label>
<?php } ?>
<label><input type="submit" id="searchsubmit" value="Search" class="btn-arrow"></label>
</form>