This is my current URL.
I've had this new project now for some time and I was wondering if:
- There is a way that when the user clicks Gadgets it sends him to ....
cat=gadgets
, and it also remembers the previous selections - How can I transform that awful looking dropdown list into something more appealing like radio or just two basic buttons.
My code:
<div id="advanced-search">
<form action="<?php bloginfo('url');?>/recipes" method="GET" id="searchF1">
<?php
$searched_term = get_query_var('recipe_search');
if (empty($searched_term)) {
$searched_term = isset($_GET["search"]) ? $_GET["search"] : "";
}
?>
<input id="sfield" type="text" name="search" placeholder="keywords" <?php if (!empty($searched_term)) {echo 'value="'.$searched_term.'"';} ?>>
<select id="img" name="images">
<option value="1" <?php if($_GET["images"]=='1'){ echo 'selected="selected"';} ?>>with pictures</option>
<option value="0" <?php if($_GET["images"]=='0'){ echo 'selected="selected"';} ?>>without pictures</option>
</select>
<div id="time-side">
<!--<small>Published time</small>-->
<input type="text" id="from-side" name="from" placeholder="Start date">
<input type="text" id="to-side" name="to" placeholder="End date">
</div>
<input type="submit" value="Tech">
<input type="submit" value="Gadgets">
</form>
</div>