• So this piece of code works for search results wherever I put it on my site…

    <div class="search">
    			<form action="<?php echo home_url(); ?>" name="SearchForm" method="get">
    				<input type="text" name="s" maxlength="64" id="SearchForm" value=" " placeholder="Search" />
    			</form>
    			<div class="srch_btn" onclick="SearchForm.submit()"><img src="/wp-content/themes/switch/images/search-img.png" width="16" height="16"></div>
    		</div>

    …except when I place that same code inside a text-widget. The issue is that I’m using a top panel sliding plugin for the header, so that’s where I need to include the search code. Unfortunately it returns as “<?s=” (leading to a 404 error) instead of “?s=”. I have googled all over and have not found any reason for that left carrot.

    Site is temp.afrontporchdesign.com. Click on the top menu bar and the search button is in the upper right.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Search Code in Widget’ is closed to new replies.