Post by Vector224 » Sat Dec 14, 2019 5:05 pm

Hello,
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>
         
         
and inside

Code: Select all

  <?php echo $basel_search; ?>
I have this:

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>	
Any help to show results will be appreciated!
Thanks!

New member

Posts

Joined
Thu May 03, 2018 4:43 am


Post by cyclops12 » Sat Dec 14, 2019 6:51 pm

Do you mean you moved the search to the top nav menu? as it is normally in header by default using default theme
If you have moved it to the top nav menu then this may help

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 3 guests