• Resolved applesfaceman

    (@applesfaceman)


    I would like to remove all widgets from the primary widget area (right side) only from my home page, i have the search box, meta widget and recent updates, but i do not want it on my home page.

    thank you

    twenty ten.

Viewing 7 replies - 1 through 7 (of 7 total)
  • <?php if( !is_home() && !is_front_page() ) :?>
    		<div id="primary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    
    <?php
    	if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    
    			<li id="search" class="widget-container widget_search">
    				<?php get_search_form(); ?>
    			</li>
    
    			<li id="archives" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
    				<ul>
    					<?php wp_get_archives( 'type=monthly' ); ?>
    				</ul>
    			</li>
    
    			<li id="meta" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
    				<ul>
    					<?php wp_register(); ?>
    					<li><?php wp_loginout(); ?></li>
    					<?php wp_meta(); ?>
    				</ul>
    			</li>
    
    		<?php endif; // end primary widget area ?>
    			</ul>
    		</div><!-- #primary .widget-area -->
    <?php endif;?>
    Thread Starter applesfaceman

    (@applesfaceman)

    thank you esmi, i hate to be so helpless but could you tell me where this goes, or if i am replacing something with this?

    Sorry – I should have said…

    It’s a replacement for the primary widget area code in the 2010 theme’s sidebar.php file. Look for the block of code that starts with <div id="primary" class="widget-area" role="complementary"> and ends with </div><!-- #primary .widget-area --> and try replacing it with the code above.

    Thread Starter applesfaceman

    (@applesfaceman)

    dude i love when things just work. thank you esmi. there should be prizes to be won for the moderators here. you guys are awesome.

    Thank you. ??

    I’m not sure if this question relates to my question, but esmi you seem to know what you’re doing! Hope you can help me.

    I am using twenty ten and I can’t figure out how to get rid of the meta info (login, search, archives) on the right side of all the pages, for example: https://masterpiecefinishesva.com/wordpress/?page_id=2

    I have searched the forums but don’t see how to do it. It is it even possible with this themes to remove all the meta data so that it’s just a regular site? Or should I be using something like the Sandbox theme instead?

    Hi, I am also having the same problem, I want to remove the widgets from the home. I tried using this code but after that the widgets get removed from home page but it looks very messy on the other pages can any one help.
    my weblink is – https://www.acuityassociatesrecruitment.com
    i want the widgets to look same as they look now on the other pages, but want to remove it from home page. please help me

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘remove widgets from Primary widget area, ONLY on main home page’ is closed to new replies.