Support » Fixing WordPress » how to remove links on sidebar??

  • I’ve finally created my site sort of the way I want it, now just want to remove the various links that are on the right side bar! Archives, Categories, Blogroll and Meta….. anybody know how to do this??

Viewing 14 replies - 1 through 14 (of 14 total)
  • Ryan S

    (@ryan_accuwebhosting)

    login to your ashboard
    go to Appearance –> Widgets and add/remove whatever you want

    If you are using widgets, then just remove those widgets, otherwise you will need to delete code in your sidebar.php.

    For example in the WordPress Default theme, you would edit wp-content/themes/default/sidebar.php and delete:

    <li><h2>Archives</h2>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>
    </li>
    <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
    <?php wp_list_bookmarks(); ?>
    <?php wp_meta(); ?>

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

    Hi moderator,
    I have followed a lot of posts here on this subject but they don’t seem to help.

    i am rocking wordpress 2.8 and have totally eliminated the meta code in my sidebar.php so much that it doesn’t even say <h2>meta</h2>

    BUT

    ofcourse, the meta info is still in the sidebar of my site. i am guessing that i am not deleting what i need to.

    any help will be appreciated.

    thanks

    Now read the second post in this thread.

    ok, what i mean is, that i want to modify the meta information.
    i want to keep login/logout and get rid of all the other links in meta.

    what i meant in my question was that i deleted all the meta as a test, and still ended up with all the meta. so what i need to know is, where is the real meta code that i need to edit to delete all the meta links except login/logout.

    thanks for any help on this.

    Thanks for the link sweetangst.

    although, my widgets.php page looks a lot bigger than the one in the linked article and there is no code similar to the one posted there.

    maybe my WP version is different. I am rockin version 2.8.1

    Thanks

    Perhaps look in: includes/default_widgets.php

    Lines 295-302

    <ul>
    			<?php wp_register(); ?>
    			<li><?php wp_loginout(); ?></li>
    			<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    			<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    			<li><a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
    			<?php wp_meta(); ?>
    </ul>

    Thanks sweetangst, but still can’t find it.
    No problem, I’m over wordpress for the moment anyway.

    Thanks again

    I pulled that directly from a WP 2.8.1 wp-includes/default_widgets.php

    So… if you delete these lines:

    <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    			<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    			<li><a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
    			<?php wp_meta(); ?>

    And then add the Meta Widget, you only get:

    Meta
    Site Admin
    Log out

    If you haven’t added any widgets on your own, then you’re getting just the default widgets. In which case, you can delete all the Meta stuff from your sidebar.php but it won’t do any good whatsoever… because you still need to do the above process and edit your wp-includes/default_widgets.php

    If you open default_widgets.php and do a search for “meta” it will take you DIRECTLY to the Meta Widget Class where you’ll find the lines to delete.

    Just as an FYI to other followers of this thread:
    Pages, Archives, Categories, Blogroll and Meta are the default widgets.

    If anyone else reading this post has all of them and wants to get rid of all of them or some of them but you don’t see them in your sidebar on the widget page… Take a breath, they aren’t hiding. You aren’t crazy. They’re just the defaults. If you don’t want them, you have to go into your dashboard and ADD the widgets you DO want…. it will make the rest all magically disappear!

    If you don’t want ANY widgets whatsoever: Go to your admin panel, add a text widget and leave it blank. Save. Done.

    Thank you sweetangst,
    the explaination you just wrote was well written and easy to understand. Oh I wish everyone could explain things on the net like you do. 🙂
    I will try what you suggest, as I didn’t look in the default_widgets.php file….I was looking in the widgets.php file.
    Strangly though, I did search for the word ‘meta’ on my WP folder using dreamweaver and it still didn’t show me that it comes up in default_widgets.php.
    Anyway, am sure you are right and I will check it out later tonight. Just wanted to say thanks for your patience and excellent assistance and cute smile in your avatar photo to boot.

    Merci

    Au revoir,

    James

    Hi Sweetangst,

    I tried what you suggested and it worked fine thank you.

    James

    Thanks sweetangst:
    I could not have found it without your help. Now I got just what I wanted.
    Check out
    SalsaHowz
    to see the result. feel free to send a comment

    Anthony

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘how to remove links on sidebar??’ is closed to new replies.