roastporksandwich.tumblr

How to Make Your Search Box Functional in Five Simple Steps

All right, so you have a search box, but whenever you try and search something, nothing comes up? Thousands of Tumblr users are faced with this problem. Well, I’m the sandwich to turn that frown upside down! :D

Step 1: First off, back up your theme in Word, or something of that nature–in case anything goes wrong. On the desired blog, Customize>>>Custom HTML, and scroll to the bottom and highlight and copy all the text, and proceed to paste it into word.

Now, each theme is different, so the following method may not work with everyone’s theme; however, the following worked for me:

<script type=“text/javascript”>
<!–
function handleThis(formElm)
{
window.location=“http://YOURURLHERE.tumblr.com/tagged/”+formElm.number.value+“”;
return false;
}
</script>

Important Note: Replace “YOURURLHERE” with your URL, XD

Step 2: Insert the following at the top of your custom HTML page:

Step 3: Press Ctrl+F, and type “search”.

Step 4: When you find your search box’s code, replace it with the following:

<center><form onsubmit=“return handleThis(this)”>
<input type=“text” name=“number” />
<input type=“submit” value=“Search” />
</form></center>

Step 5: Now you should have a fully functional search box! :)

For a test, try searching “lol”, or “gif”–you’re bound to find something! ;)

Didn’t work for you? Message me, and I’ll get it to work for you! >:D

Got any questions about HTML (OR ME, >:D) that you want help with? I can help! :D

I think it’d be fun to have an F.A.Q.–FILL UP MAH ASK BOX, XD