Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

How to add text in Search Widget


  #1  
Old Feb 4, 2009, 01:24 PM
sagatr
 
6 posts · Jan 2009
Hi

How can you add text in search box, on the search widget, just before the magnifer.

I want to add the text "search" in the box before the magnifier.

Thanks.
  #2  
Old Feb 4, 2009, 01:53 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Change searchform.php line 5 from
PHP Code:
<input type="text" class="text inputblur" value="<?php the_search_query(); ?>" name="s" />
to
PHP Code:
<input type="text" class="text inputblur" 
onfocus="this.value='<?php echo (get_search_query() ? get_search_query() : '' ); ?>'" 
value="<?php echo (get_search_query() ? get_search_query() : 'DEFAULT SEARCH TEXT' ); ?>"  name="s" />
Replace DEFAULT SEARCH TEXT with your default search text, i.e. search

  #3  
Old Feb 8, 2009, 05:06 AM
tikdi
 
7 posts · Feb 2009
Thanks, that helped. I was looking for it too.

Bookmarks

Tags
search, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Search Box to Page Menu vinniev Page & Category Menu Bars 6 May 19, 2010 01:06 AM
[SOLVED] How to Add Text to ALL Posts? strangelove Atahualpa 3 Wordpress theme 4 Feb 28, 2010 01:53 PM
[SOLVED] Text Widget - how can I highlight all text (ctl-A) for a fast delete? Leoni Plugins & Atahualpa 5 Jul 14, 2009 08:38 PM
Changing a widget display from block to inline (Twitter Text Widget) Flur Sidebars & Widgets 2 May 7, 2009 12:45 PM
adding text in search widget ppat2 Sidebars & Widgets 1 Apr 28, 2009 01:09 AM


All times are GMT -6. The time now is 03:05 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.