• Resolved nb0602

    (@nb0602)


    I have been trying to delete the search box from my website spunlytravelers.com for days. I have a static front page and use no posts. What file would I edit to do this in the child twenty ten theme and what code would I add or delete?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    If it’s the Twenty Ten theme you’re trying to remove it from, there are a couple different ways to do it using CSS, but because it has it’s own unique id, you can use this.

    One example:

    #search-2 {
    display: none;
    }

    This should hide the list item from the site in all pages. You’re going to want to add this in the child-theme’s style.css file. Let me know if this helps.

    Andrew

    Thread Starter nb0602

    (@nb0602)

    Take a look at my website, https://www.spunkytravelers.com. The particular solution you provided here does not work. The only place in Twenty ten I’ve been able to find any reference to the search form is in the sidebar.php. However, even creating a new blank sidebar.php file in the child theme does not get rid of the “search box” on the static front page.

    Thanks for the super quick response!

    Okay, I see, this is a bit different than just the twenty ten theme. So you want to get rid of the Search box completely? To the right of “Special Trips for Special People”?

    Andrew

    Thread Starter nb0602

    (@nb0602)

    Hi, Andrew.

    Yes, I want to get rid of the search box completely. Yes, the one to the right of “Special Trips for Special People.”

    This is a list of the changes I’ve made to the twenty ten theme:
    1. Everything is one column – no sidebar
    2. I’ve added a slide show to the header – meteor slides plug in
    3. Table Press plug in for the table
    4. Static front page

    As you can see the search box is superfluous since I don’t have a lot to search for. The table has everything in it that would be searched for. The search box just confuses my clientele.

    Thanks again for the quick response.

    hi
    You can edit ur sidebar.php
    Note: Before you make any changes to these files make sure you have a backup
    search for this kind of code –

    <li id=”search” class=”widget-container widget_search”>
    <?php get_search_form(); ?>

    just remove or comment the search form.
    any changes you make will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    refd:
    -https://www.chorosdesign.com/2010/10/move-the-search-box-to-the-header-wordpress-3-revision/

    Thread Starter nb0602

    (@nb0602)

    Hi, Praj:

    I’ve already tried this and, unfortunately, it doesn’t work.

    Looking at your site in Firebug, this appears to be the HTML for the Search field:

    <div id=”tablepress-1_filter” class=”dataTables_filter”>
    <label>
    Search:
    <input type=”text” aria-controls=”tablepress-1″>
    </label>
    </div>

    Can you add the “display: none” CSS property to either the class or the id in your child theme’s stylesheet? Or you can just comment it out as Praj stated. Or is this something that cannot be done? It “removes” it in Firebug. It seems like that should work, unless I’m not understanding something. The id should be unique so:

    #tablepress-1_filter {
    display: none;
    }

    Let me know if this helps.

    Andrew

    Thread Starter nb0602

    (@nb0602)

    Thanks both to Praj and Andrew!

    Andrew, your second solution worked! It never occurred to me that the table plugin had the code.

    Praj, my problem may also have had something to do with IE. I tried your solution before I posted this request. I saw your post about moving the search bar and thought if I just commented out that section it would delete the search box. Nope.

    Thanks, everyone.

    Great! Glad it worked for you! Take care!

    Andrew

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Delete Search Box from Twenty Ten Theme’ is closed to new replies.