• 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)
  • 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.

    Thread Starter rickybuitrago

    (@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.

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

    Thread Starter rickybuitrago

    (@rickybuitrago)

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

    hope that works (never used pastebin before)

    Thanks

    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!

    Thread Starter rickybuitrago

    (@rickybuitrago)

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

    “The requested theme does not exist”

    What do you suggest?

    Thanks

    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=”https://pastebin.com/embed_iframe.php?i=FDYt0mVm&#8221; style=”border:none;width:100%” height=”5″></iframe>

    Thanks!

    David

    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.