WordPress.org

Ready to get started?Download WordPress

Forums

how to remove links on sidebar?? (15 posts)

  1. marcdupuis
    Member
    Posted 5 years ago #

    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??

  2. Ryan S
    Member
    Posted 5 years ago #

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

  3. MichaelH
    Member
    Posted 5 years ago #

    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

  4. antistandard
    Member
    Posted 5 years ago #

    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

  5. esmi
    Forum Moderator
    Posted 5 years ago #

    Now read the second post in this thread.

  6. antistandard
    Member
    Posted 5 years ago #

    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.

  7. sweetangst
    Member
    Posted 5 years ago #

  8. antistandard
    Member
    Posted 5 years ago #

    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

  9. sweetangst
    Member
    Posted 5 years ago #

    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>
  10. antistandard
    Member
    Posted 5 years ago #

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

    Thanks again

  11. sweetangst
    Member
    Posted 5 years ago #

    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.

  12. sweetangst
    Member
    Posted 5 years ago #

    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.

  13. antistandard
    Member
    Posted 5 years ago #

    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

  14. antistandard
    Member
    Posted 4 years ago #

    Hi Sweetangst,

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

    James

  15. salsakidd
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic