I am trying to place a search bar in the header and I was able to do that successfully, but the problem is when I tying search for anything it isn't working and it's directing me to www.domain.com/search NOT www.domain.com/search/?search=test, how do I let the search bar to work just the default one and actually show me results. All I did to place the search bar in the header, I put this code in the header:
Code: Select all
<div class="mobile-search">
<?php echo $basel_search; ?>
</div>
Code: Select all
<?php echo $basel_search; ?>
Code: Select all
<div class="search-field">
<input type="text" name="search" value="<?php echo $search; ?>" placeholder="<?php echo $basel_text_search; ?>" class="form-control main-search-input" />
<span class="btn btn-contrast do-search main"><?php echo $basel_text_search; ?></span>
</div>
<script>
$(document).ready(function() {
$('.search-holder-mobile input[name=\'search-mobile\']').attr("placeholder", "<?php echo $basel_text_search; ?>").attr("value", "<?php echo $search; ?>");
});
</script>
Thanks!