WordPress.org

Ready to get started?Download WordPress

Forums

Quick question about theme '2011' (5 posts)

  1. roppolo
    Member
    Posted 2 years ago #

    What is the easiest way to remove the search box at the top of the pages?

    Thanks!

  2. ChristiNi
    Member
    Posted 2 years ago #

    Hi roppolo,

    Create a Child Theme first:

    http://codex.wordpress.org/Child_Themes

    Then in the Child Theme's style sheet look for this:

    /* Search Form */
    #branding #searchform {
    	position: absolute;
    	top: 3.8em;
    	right: 7.6%;
    	text-align: right;

    Add this just below that last line:

    display: none;

    So the code now looks like:

    /* Search Form */
    #branding #searchform {
    	position: absolute;
    	top: 3.8em;
    	right: 7.6%;
    	text-align: right;
    	display: none;

    Hope this helps!

  3. roppolo
    Member
    Posted 2 years ago #

    LOL that's the easy way?

  4. Brett
    Member
    Posted 2 years ago #

    That is one way of doing it. The second would be going in and dropping an empty text widget in. Or by clicking on:

    1. Appearance -- Editor.
    2. Going to sidebar.php
    3. Find the code that has search.
    4. Delete it.
    5. Save.

  5. roppolo
    Member
    Posted 2 years ago #

    I dont see it in sidebar.php, Brett... am I missing it?

    <?php
    /**
     * The Sidebar containing the main widget area.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    $options = twentyeleven_get_theme_options();
    $current_layout = $options['theme_layout'];
    
    if ( 'content' != $current_layout ) :
    ?>
    		<div id="secondary" class="widget-area" role="complementary">
    			<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
    
    				<aside id="archives" class="widget">
    					<h3 class="widget-title"><?php _e( 'Archives', 'twentyeleven' ); ?></h3>
    
    <ul>
    						<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
    					</ul>
    				</aside>
    
    				<aside id="meta" class="widget">
    					<h3 class="widget-title"><?php _e( 'Meta', 'twentyeleven' ); ?></h3>
    
    <ul>
    						<?php wp_register(); ?>
    
    <li><?php wp_loginout(); ?></li>
    						<?php wp_meta(); ?>
    					</ul>
    				</aside>
    
    			<?php endif; // end sidebar widget area ?>
    		</div><!-- #secondary .widget-area -->
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic