WordPress.org

Ready to get started?Download WordPress

Forums

How to Remove Default Widgets (9 posts)

  1. rickybuitrago
    Member
    Posted 4 years ago #

    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!

  2. racer x
    Member
    Posted 4 years ago #

    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.

  3. rickybuitrago
    Member
    Posted 4 years ago #

    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.

  4. racer x
    Member
    Posted 4 years ago #

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

  5. rickybuitrago
    Member
    Posted 4 years ago #

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

    hope that works (never used pastebin before)

    Thanks

  6. racer x
    Member
    Posted 4 years ago #

    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!

  7. rickybuitrago
    Member
    Posted 4 years ago #

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

    "The requested theme does not exist"

    What do you suggest?

    Thanks

  8. silver_mica
    Member
    Posted 3 years ago #

    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

  9. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic