How to get rid of search box on a wordpress template

by phil.wheatley 5 replies
Hi Gang

You see this site: Martial Arts Wembley - Taekwon-Do Warriors Club - there is a search box top right I want to get rid of, I assume I will have to take some code out?

Anybody know which part of the editor I go to to safely remove it, or which code to remove?

Many thanks
Phil
#main internet marketing discussion forum #box #rid #search #template #wordpress
Avatar of Unregistered
  • Profile picture of the author Preben Frenning
    W00t! Taekwon Do! I'm a black belt
    Anyways, it seems the search box is in the header.

    Open header.php, and remove <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    I assume that would remove it. (I'm not a programmer, nor a WP guru, but using common sense, and looking at the code have worked wonders for me =))

    Simply removing searchform.php, might also work.

    Remember to back up everything in case it messes up the theme! (The files you change)

    I hope that helps,
    - Preben
    Signature

    Content overload? Too many tabs open? Then
    check out my awesome tech startup! - It will make your life easier.


    Twitter? - http://twitter.com/Preben_Frenning

    {{ DiscussionBoard.errors[2263429].message }}
    • Profile picture of the author ptone
      Originally Posted by Preben Frenning View Post

      Open header.php, and remove <?php include (TEMPLATEPATH . "/searchform.php"); ?>
      I highly recommend that instead of removing that line of code, you comment out that line of code. Everything between the comment tags will be ignored.

      Use <!-- before the code you want "removed" and --> afterward. So that

      <?php include (TEMPLATEPATH . "/searchform.php"); ?>

      becomes

      <!--<?php include (TEMPLATEPATH . "/searchform.php"); ?>-->

      I know you stated to back it up first, but it would be so much easier to just remove the comment tags than to restore from backup if something goes wrong.
      {{ DiscussionBoard.errors[2263511].message }}
      • Profile picture of the author Gail_Curran
        Originally Posted by ptone View Post

        I highly recommend that instead of removing that line of code, you comment out that line of code. Everything between the comment tags will be ignored.

        Use <!-- before the code you want "removed" and --> afterward. So that

        <?php include (TEMPLATEPATH . "/searchform.php"); ?>

        becomes

        <!--<?php include (TEMPLATEPATH . "/searchform.php"); ?>-->

        I know you stated to back it up first, but it would be so much easier to just remove the comment tags than to restore from backup if something goes wrong.
        This is a great little technique that everyone building blogs or html sites should know. If the part to be commented out is long, do it like this:

        <!--

        stuff to be commented out
        blah
        blah

        -->

        It can be used to comment out dates, "posted by" info, and many other annoying things that are included in WP or html templates.
        -
        {{ DiscussionBoard.errors[2263675].message }}
  • Profile picture of the author phil.wheatley
    Hey thanks guys for your help, commenting it out seems to be the way forward, I'll try that now.

    @Preben, cool, black belt! Although the site is for another guy, not me, although I'm in fact a black belt at Kung Fu instead...I feel a battle of the "which is the best martial arts" coming on lol.

    Anyway, thanks again guys for the help

    Phil
    Signature



    It's still not working for you??? Need direction?...
    ---->>>> BrainDirection.com <<<<----
    {{ DiscussionBoard.errors[2264630].message }}
    • Profile picture of the author Preben Frenning
      @phil.wheatley - No need for discussion, I'll just admit that kung fu is better
      I got my black belt when I was 12, which is over 8 years ago, so I can't say I'm a "Selv-defense machine" atm :p

      And @ptone and @Gail_Curran - Great tip! I have just learned wordpress by myself, so it will DEFINITELY be used in blog creation later
      Signature

      Content overload? Too many tabs open? Then
      check out my awesome tech startup! - It will make your life easier.


      Twitter? - http://twitter.com/Preben_Frenning

      {{ DiscussionBoard.errors[2264963].message }}
Avatar of Unregistered

Trending Topics

  • 1 {{ upvoteCount | shortNum }}

    Steps to Build a Business from Nothing

    steevsteefan in Internet Marketing

    There are questions that unavoidably come up when you begin considering how to draw an obvious conclusion regarding what you’re selling and who you’re endeavoring to reach. Regardless of whether ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Is shopify good for eCommerce solutions ?

    Justinspencer in eCommerce

    Hi, Shopify provides the platform and all the core features and allows developers to offer hyper-specialized products that plugin seamlessly to Shopify's platform. Shopify is a platform for online store ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Benefits of a Business with Wanelo Clone Script

    steevsteefan in Internet Marketing

    In the event that you are a business person, unquestionably you have your own particular website and furthermore know about WordPress and Joomla. Those are a portion of the best ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    How To Brand your Multi-Vendor Store

    steevsteefan in Internet Marketing

    resently, if you have multiple vendors who offer their products in your store. Business is fine, however, could be better. It’s a great opportunity to consider how you brand your ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Start a business in wanelo clone script

    steevsteefan in eCommerce

    I just want to share some useful info about clone software.Now a days clone software are trending now.If you want to start a business i just suggest Wanelo clone script.Its ... [read more]