Submitted by theredmunkey on November 1, 2007 - 2:06pm.
I'm having the same problem as 3lie. I think it has to do with the widget implementation. It seems that currently the extra code for the search form in l_sidebar.php is not needed as it gets overwritten by the WordPress search widget (I'm just guessing this).
I'd like to have the same implementation of the search bar as the demo site. That is without the search button underneath (like 3lie's picture above).
would do the trick. But like I said above, no matter what you do to the l_sidebar.php, the searchbar remains the same. You can even delete all the code mentioned above by Brian Gardner and still have the searchbar function like in 3lie's picture.
Anyone have any insight on how to fix this problem?
Submitted by theredmunkey on November 11, 2007 - 12:41am.
I've found a solution I'm very happy with.
I've been able to add the Nightlife searchbar (without the "Search" button) to my sidebar while still being able to use my widgets. All you have to do is add the search code to l_sidebar.php above the widget caller conditional.
Basically:
ADD
<form method="get" id="search_form" action="<?php bloginfo('home'); ?>/"> <input type="text" class="search_input" value="To search, type and hit enter" name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" /> <input type="hidden" id="searchsubmit" value="Search" /> </form><br />
Answer
Hi Ken,
You'll need to add the Wordpress search function. I put it in the sidebar of my homepage.
Ooops
Can't believe I missed that one. If either of you need help adding it, let me know. Email me at bmg1227@hotmail.com
Code
Here's how the code in the l_sidebar.php file should look:
<div id="l_sidebar">
<ul id="l_sidebarwidgeted">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
<form method="get" id="search_form" action="<?php bloginfo('home'); ?>/"><input type="text" class="search_input" value="To search, type and hit enter" name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" /><input type="hidden" id="searchsubmit" value="Search" />
</form><br />
<li id="Recent">
<h2>Recently Written</h2>
<ul>
<?php get_archives('postbypost', 10); ?>
</ul>
</li>
Thanks everyone!
Brian, i've dropped you a mail. Thanks!
I have a problem with e
I have a problem with e search widget
I don't know what happen with that... I've cheked the code and it's the same you got up there.
How could be this possible?
HELP PLEASE!
I'm having the same problem
I'm having the same problem as 3lie. I think it has to do with the widget implementation. It seems that currently the extra code for the search form in l_sidebar.php is not needed as it gets overwritten by the WordPress search widget (I'm just guessing this).
I'd like to have the same implementation of the search bar as the demo site. That is without the search button underneath (like 3lie's picture above).
I assumed removing the
<!-- -->from
<!-- <input type="hidden" id="searchsubmit" value="Search" /> -->would do the trick. But like I said above, no matter what you do to the l_sidebar.php, the searchbar remains the same. You can even delete all the code mentioned above by Brian Gardner and still have the searchbar function like in 3lie's picture.
Anyone have any insight on how to fix this problem?
I've found a solution I'm
I've found a solution I'm very happy with.
I've been able to add the Nightlife searchbar (without the "Search" button) to my sidebar while still being able to use my widgets. All you have to do is add the search code to l_sidebar.php above the widget caller conditional.
Basically:
ADD
<form method="get" id="search_form" action="<?php bloginfo('home'); ?>/"><input type="text" class="search_input" value="To search, type and hit enter" name="s" id="s" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" />
<input type="hidden" id="searchsubmit" value="Search" />
</form><br />
ABOVE
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>And that will in effect put the Nightlife searchbar above all your widgets while keeping your widget functionality.
Post new comment