The NetMediaBlog

  • Home
    • About NetMediaBlog
    • Contributors
    • Guest Posting
    • Contact
  • Technology
    • Computers
      • Softwares
      • Downloads
      • Gaming
    • Smartphones
    • Internet
      • Tech Guide
  • Tutorials
  • Blogging Tips
    • WordPress
    • Blogger
    • SEO
  • Social Media
    • Facebook
    • Twitter
    • LinkedIn

How to remove the default search box in WordPress blog

March 16, 2012 By Nwosu Desmond 1 Comment

Sometime ago i wrote on “How to remove the navbar in a blogger blogspot blog” but today i will be writing on how to remove the default search box in WordPress blog. If you are a WordPress user, the default search box may be of good use to you, but it won’t hurt if you also earn from search activities from your blog. So today I am ging to teach you how you can remove the default search box from your WordPress theme and replace it with a Google search for adsense that can fetch you money when visitors use it to search for something in your site.

NOTE: The default search box in WordPress is dependent of the type of theme, so they may not be in same file as the example I may give. I am using a TechMaish theme and the search box is on a file called Sidebar (Sidebar.php). I have heard of cases where the search box is on a footer.php file. So you must be able to identify the file that contains the search box script.

Remember to backup any file before tampering with it, that way if you make a mistake you can restore your file from the backup.

How to remove the default search box in WordPress blog

In my case this is the sidebar.php file, if you see very well the search box is on an inbuilt widget of my theme. So follow my simple instructions to remove the search box from your WordPress blog.

How to remove the Search Box from my WordPress blog: 
1.  Login to your WordPress Dashboard through the www.yourdomain.com/wp-admin/

2. On the left hand side of the Dashboard, click on Appearance

3. Next click on Editor

4. Choose the Sidebar.php file (or any file containing your search box script)

<div id=”sidebar”>
<div class=”sidebar-wrap”>

<div class=”wide-widget”>
<h2>Search</h2>
<?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
</div>

<?php $tm_check125 = get_option(‘tm_check125’); if($tm_check125): ?>
<div id=”ads-box”>
<a href=”<?php $tm_ad1link = get_option(‘tm_ad1link’); echo stripslashes($tm_ad1link); ?>” rel=”nofollow” target=”_blank”><img
src=”<?php $tm_ad1path = get_option(‘tm_ad1path’); echo stripslashes($tm_ad1path); ?>” alt=”advertisment” width=”125″ height=”125″/></a>
<a href=”<?php $tm_ad2link = get_option(‘tm_ad2link’); echo stripslashes($tm_ad2link); ?>” rel=”nofollow” target=”_blank”><img
src=”<?php $tm_ad2path = get_option(‘tm_ad2path’); echo stripslashes($tm_ad2path); ?>” alt=”advertisment” width=”125″ height=”125″/></a>
<a href=”<?php $tm_ad3link = get_option(‘tm_ad3link’); echo stripslashes($tm_ad3link); ?>” rel=”nofollow” target=”_blank”><img
src=”<?php $tm_ad3path = get_option(‘tm_ad3path’); echo stripslashes($tm_ad3path); ?>” alt=”advertisment” width=”125″ height=”125″/></a>
<a href=”<?php $tm_ad4link = get_option(‘tm_ad4link’); echo stripslashes($tm_ad4link); ?>” rel=”nofollow” target=”_blank”><img
src=”<?php $tm_ad4path = get_option(‘tm_ad4path’); echo stripslashes($tm_ad4path); ?>” alt=”advertisment” width=”125″ height=”125″/></a>
</div> <!– #ads-box–>
<?php endif; ?>

<?php /* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Sidebar’) ) : ?>
<?php endif; ?>
</div> <!– .sidebar-wrap –>
<div class=”clear”></div>
</div> <!– #sidebar –>

5. Delete the file in red as above.

6. Save your file

7. Check your WordPress blog on a browser to see if the search box has been removed or not.

I hope i have helped you today to remove the default search box from your WordPress blog. If you like my blog posts don’t forget to Subscribe to NetMediaBlog Feeds by Email. My next blog post will be how to add Google Search for adsense in place of the default search box in WordPress blog.

Other Posts You May Like...

  • stock-market-3Top WordPress Plugins to Boost Your Site’s Traffic
  • Flat design modern vector illustration concept of process web page coding and programming on laptop with workflow objects and icons. Isolated on stylish blue backgroundMore Reasons to Blog as an Entrepreneur
  • Wordpress-start-image5 Great WP Widgets for Your Blog
  • 7-Reasons-Why-Your-Business-Should-Be-BloggingShould you still blog in 2015?
  • BlogWhy is your blog not successful?

Filed Under: Blogging Tips Tagged With: blog, Search, Search box, theme, wordpress

Comments

  1. woman apparel says

    April 25, 2012 at 12:47 pm

    Super-Duper blog! I am loving it!! Will be back later to read some more. I am bookmarking your feeds also

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe To My Blog

Get the latest content first.


Recommended Articles

  • Reasons why you should use Pinterest to promote your products
  • How Content Freshness can improve SERP
  • Netmediablog January Post Round-Up
  • How to use Whatsapp on your computer – Netmediablog
  • How to Transfer Contacts from iPhone to Android

Recommended from BroadedNet

We are upgrading BroadedNet, Blog Traffic Tool. Please keep reading www.netmediablog.com
Get Netmediablog Extension

Find Us on Facebook

Recent Comments

  • Sugar Daddy on Search Engine Optimization Tips for Images
  • Sugar Mummy on How an Active Blog Affects Your Google Rank
  • Larry Frank on 15 Highly Optimized WordPress Themes for Search Engines
  • Steven on How to transfer Contacts from Samsung Galaxy S2 to Galaxy S4
DMCA.com
  • About NetMediaBlog
  • Contributors
  • Advertise With Us
  • Contact Us
  • Guest Posting
  • Privacy Policy

Disclaimer Copyright © 2023 Netmediablog . Log in