WordPress.org

Support

Support » How-To and Troubleshooting » How to Remove Default Widgets

How to Remove Default Widgets

  • rickybuitrago
    Member

    @rickybuitrago

    Iv searched everywhere for this and have found no effective answer.

    I simply want to remove from my sidebar default widgets like Archives, Random Posts, Tag Cloud and Blogroll. The problem is when I go to Appeareance > Widgets, they dont appear in my sidebar, they just dont, but when I go to my site, there they are, so I havent been able to delete them!

    I read about editing sidebar.php but I have no idea what to do with that file.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • racer x
    Member

    @racer-x-1

    They were probably hard-coded into sidebar.php as you have been told.

    If you could copy and post all the code here for sidebar.php(using the code button above the editor before and after) we could take out those items for you.

    rickybuitrago
    Member

    @rickybuitrago

    wow, thanks, that would be very helpful.

    Please only take out: Random Posts, Archives, Blogroll and Meta.

    Here is the code:
    [code moderated] Please use a pastebin when posting numerous lines of code.

    racer x
    Member

    @racer-x-1

    That’s my bad, I thought that would be small enough to post here. Let us know when you post it.

    rickybuitrago
    Member

    @rickybuitrago

    Here it is http://pastebin.com/embed_js.php?i=mctV3iFJ

    hope that works (never used pastebin before)

    Thanks

    racer x
    Member

    @racer-x-1

    Ok, make a copy of your existing sidebar.php file FIRST and store it somewhere.

    Then try this new file out. I had no way to test it of course because I don’t have that theme installed so the functions will throw an error.

    I hope it works!

    rickybuitrago
    Member

    @rickybuitrago

    Hey, unfortunately, it didn’t work. I get this message:

    “The requested theme does not exist”

    What do you suggest?

    Thanks

    silver_mica
    Member

    @silver_mica

    What exactly was removed? (I don’t see the original code in this thread). I’d like to try editing my sidebar.php file too.

    I am having the same problem as described by the OP. I designed a page, then found a different theme, but I’m stuck with widgets that cannot be removed (easily for me). That is to say when I go to Widgets I can see that none are installed, yet my live page shows tags, archives, a calendar, categories, and meta.

    I’m using the Daleri Sweet theme.

    Here’s my code:
    <iframe src=”http://pastebin.com/embed_iframe.php?i=FDYt0mVm” style=”border:none;width:100%” height=”5″></iframe>

    Thanks!

    David

    Michael
    Moderator

    @alchymyth

    general:
    if you go to dashbaord – apperance – widgets: and drag any one of them into the widget area, the ‘default widgets’ should normally disappear.

    if you want to empty the sidebar file, just leave this:

    <div id="sidebar">
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Top') ) : else : ?>
    
    <?php endif; ?>
    
    <div class="left">
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Left') ) : else : ?>
    
    <?php endif; ?>
    </div>
    
    <div class="right">
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar Right') ) : else : ?>
    
    <?php endif; ?>
    </div>
    
    <br class="clear" />
    </div>
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to Remove Default Widgets’ is closed to new replies.