StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 09-12-2009, 03:03 AM
valeryvie valeryvie is offline
Registered User
GenesisConnect
Genesis Member
Pro Plus Member
 
Join Date: Jul 2009
Posts: 153
Default Search Function

Hi :-)

I want to move the SEARCH that appears in the widget area to the 468X60 Header Area Box -- where can I find the code for the search box to place in this area?

Thanks and thrive...

Valery
  #2  
Old 09-12-2009, 05:59 AM
Brian Gardner's Avatar
Brian Gardner Brian Gardner is offline
Administrator
 
Join Date: Sep 2008
Location: Chicago, IL
Posts: 5,360
Default Re: Search Function

Try something like this:

Code:
<form id="searchform" method="get" action="<?php bloginfo('url'); ?>/">
<input type="text" value="<?php _e("Search this website...", 'studiopress'); ?>" name="s" id="s" onfocus="if (this.value == '<?php _e("Search this website...", 'studiopress'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e("Search this website...", 'studiopress'); ?>';}" /><input type="submit" id="searchsubmit" value="<?php _e("GO", 'studiopress'); ?>" /></form>
  #3  
Old 09-14-2009, 01:39 PM
valeryvie valeryvie is offline
Registered User
GenesisConnect
Genesis Member
Pro Plus Member
 
Join Date: Jul 2009
Posts: 153
Default Re: Search Function

Hi Brian :-)

Got some funny text in it... but have decided to leave the search where it is for now :-) Thanks anyway!

Thrive...

Valery ~
  #4  
Old 09-14-2009, 02:35 PM
LenKutchma's Avatar
LenKutchma LenKutchma is offline
Registered User
Pro Plus Member
 
Join Date: May 2009
Location: Winnipeg, Manitoba CANADA
Posts: 145
Default Re: Search Function

Hi Valery,

If you're interested, this is how I did it. Basically you're swapping out the "header ad" stuff for the search box. Look in header.php for ...

Code:
    <div class="headerright">
        <?php if(get_theme_mod('468_header_ad') == 'Yes') { ?>
            <?php echo stripslashes (get_theme_mod('468_header_code')); ?>
        <?php } else { ?>
        <?php } ?> 
    </div>
and modify it so that it looks like ...

Code:
    <div class="headerright">
    	<form id="searchform" method="get" action="<?php bloginfo('url'); ?>/">
    	<input type="text" value="<?php _e("Search this website...", 'studiopress'); ?>" name="s" id="s" onfocus="if (this.value == '<?php _e("Search this website...", 'studiopress'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e("Search this website...", 'studiopress'); ?>';}" /><input type="submit" id="searchsubmit" value="<?php _e("GO", 'studiopress'); ?>" /></form>
    </div>
Then I went to the style sheet and looked for ...

Code:
.headerright {
	width: 478px;
	float: right;
	margin: 0px;
	padding: 10px 0px 0px 0px;
	}
and changed it to ...

Code:
.headerright {
	width: 230px;
	float: right;
	margin: 0px;
	padding: 20px 0px 0px 0px;
	}
I also deleted any reference of the header ad from tools/theme-options.php. If you do that be careful.
__________________
May the wind be at our backs
  #5  
Old 09-14-2009, 02:40 PM
valeryvie valeryvie is offline
Registered User
GenesisConnect
Genesis Member
Pro Plus Member
 
Join Date: Jul 2009
Posts: 153
Default Re: Search Function

Thanks Len!!!!!
  #6  
Old 09-14-2009, 02:50 PM
LenKutchma's Avatar
LenKutchma LenKutchma is offline
Registered User
Pro Plus Member
 
Join Date: May 2009
Location: Winnipeg, Manitoba CANADA
Posts: 145
Default Re: Search Function

You're welcome. :)
__________________
May the wind be at our backs
  #7  
Old 09-14-2009, 05:25 PM
Brian Gardner's Avatar
Brian Gardner Brian Gardner is offline
Administrator
 
Join Date: Sep 2008
Location: Chicago, IL
Posts: 5,360
Default Re: Search Function

I second that - thanks Len, way to go above and beyond by sharing what you did. :)

Quote:
Originally Posted by LenKutchma
You're welcome. :)
  #8  
Old 09-24-2009, 06:46 AM
Affiliate4Travel
Guest
 
Posts: n/a
Default Re: Search Function

Thanks for that. I just used the code you quoted to replace the RSS feed and comments icons with the search function.
  #9  
Old 09-25-2009, 01:36 PM
careerbright's Avatar
careerbright careerbright is offline
Registered User
Pro Plus Member
 
Join Date: Sep 2009
Posts: 19
Default Re: Search Function

Hello Affiliate4Travel ,
Please can you tell me which file to edit to replace the RSSand Posts links.
I would like to do the same, have just downloaded the NEWS theme so not very familiar with the files, your tips will help!
Thanks!
__________________
Founder President Careerbright Career Network
Website: http://careerbright.com
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Function hlmagazine General Discussion 2 07-08-2009 10:33 AM
Search function not working abijah General Discussion 3 03-11-2009 11:59 AM
How to control the search function kidkash General Discussion 5 11-27-2008 01:16 PM


All times are GMT -5. The time now is 10:00 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.