*NEW* Tag Search Box Tutorial (considerably shorter)
Can’t sleep right now, like usual.
The last tutorial was a bit lengthy so this one should be a bit shorter.
I hadn’t realized so many people were searching this up on google or I would’ve clarified and made things easier, sooner.
This one should be easier on the brain, haha.
1) Go to Customize appearance for your theme, and click Custom HTML. Copy the code below and paste it after the <head>. This is the script that will allow the tag search box to function.
<meta name="text:Search Label" content="" />
<script type="text/javascript" src="http://static.tumblr.com/8oupd2j/BYTm7u5cn/tag_search.js"></script>
2a) If you don’t already have a search box, copy and paste the code below to where ever you want the search box to be (e.g. description).
This is the actual generic search box itself:
<form onsubmit="return tagSearch(this)">
<input type="text" name="tag" value="{text:Search Label}" onfocus="if (this.value == '{text:Search Label}') {this.value=''}" onblur="if (this.value == '') {this.value='{text:Search Label}'}" />
<input type="submit" value="Search" />
</form>
2b) If you have a search box already, copy and paste the below code, then find the class or id of the form (e.g. class=”search-box” or id=”EXAMPLE-ID”) containing your desired search box and type it in between the quotation marks respectively. Overwrite your old <form> code with this new one.
If it’s a class, just replace id= with class= and the class name in between the quotations, and you’re good to go.
<form id="EXAMPLE-ID" onsubmit="return tagSearch(this)">
<input type="text" name="tag" value="{text:Search Label}" onfocus="if (this.value == '{text:Search Label}') {this.value=''}" onblur="if (this.value == '') {this.value='{text:Search Label}'}" />
<input type="submit" value="Search" />
</form>
If you don’t want a submit button, eliminate the following line of code:
<input type="submit" value="Search" />
3) Press Update Preview, and go back to Appearance to click Save.
4) Refresh the window, and you should find an option under Appearance to customize the search box text (Search Label).
5) Voila! Any further questions, email me at justcantdescribeu@gmail.com or drop an Ask. :)
You can find sources and attribution in the old tutorial here.
Happy New Years, 2012 here we goooo! :p
133 Notes/ Hide
-
thiscleverusername likes this
-
revistatwent likes this
-
matannki likes this
-
lloydly likes this
-
love4asking reblogged this from justcantdescribeu and added:
Good tutorial to use if you want to add a search box to your blog. I’ve been needing this for myself and it works great....
-
ectodoitsologist likes this
-
junesfoodcourt reblogged this from justcantdescribeu
-
tbbt-fans likes this
-
driven-by-purpose likes this
-
klaatu likes this
-
herewestandagain likes this
-
dftbyay likes this
-
ilary83 likes this
-
nasty-like-nas likes this
-
dothecup likes this
-
dothecup reblogged this from justcantdescribeu
-
getchapull333 reblogged this from justcantdescribeu
-
getchapull333 likes this
-
bitsymetcalf likes this
-
glinke reblogged this from justcantdescribeu
-
glinke likes this
-
kaleidoscope407 reblogged this from justcantdescribeu
-
cyber-brain likes this
-
wankershim likes this
-
skopjecasual likes this
-
everythingelsegoesherethen likes this
-
97kkk likes this
-
elifkins likes this
-
kaitero reblogged this from justcantdescribeu
-
the-absolute-truth likes this
-
thedetox likes this
-
ohbananaqueen likes this
-
aishinoda likes this
-
insaneandscatterbrained reblogged this from justcantdescribeu
-
insaneandscatterbrained likes this
-
kraye211 reblogged this from justcantdescribeu and added:
YOU ARE A SAINT
-
kraye211 likes this
-
monbiencherami likes this
-
tkyle likes this
-
infatuationandthelikes likes this
-
theviolenttomboy likes this
-
kukixkuki likes this
-
erifab likes this
-
recklessashlee likes this
-
seoulhee likes this
-
veilsandvisions reblogged this from justcantdescribeu
-
nordlands likes this
-
anmkosk reblogged this from justcantdescribeu
-
banale likes this
-
theyalwaysremember likes this
- Show more notes
