How to edit default META widget in WordPress 2.5


One of those things that you would want to do in WordPress is to edit the default META widget so as to remove the default links “Valid XHTML”, “XFN”, “Entries RSS”, “Comments RSS” as in technical blogs these may be looked at irrelevant content. I’ve always struggled with this and have to open and look for it in multiple files and so did I with WordPress 2.5 and finally found a way around it.

In WordPress 2.5, the default widgets are configured in the file

/<wordpress root>/wp-includes/widgets.php

In this file look for the part of the code thats as follows:

<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo attribute_escape(__(‘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 attribute_escape(__(‘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 attribute_escape(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>
<?php wp_meta(); ?>
</ul>

This is the one that adds the default META widget with its links. Remove the <li>…</li> lines which has the links. For instance, to remove the “Comments RSS” link from the META, remove this line

<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo attribute_escape(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

If you want to remove everything except the “Register” & “login/Logout” button then remove the following:

<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo attribute_escape(__(‘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 attribute_escape(__(‘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 attribute_escape(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>

However, some of the themes control this from their sidebar.php files in which case you need for the above set of code in the sidebar.php, l_sidebar.php,r_sidebar.php etc in the particular theme folder.

This should help!!!

For wordpress 2.8 users check here

  • Share/Bookmark

Related Posts

  • Google Analytics Plugin error after WordPress 2.8 upgrade
  • Wordpress 2.8 Released and available for download

Comments

8 Responses to “How to edit default META widget in WordPress 2.5”
  1. DymnZituiny says:

    Hi friend! In yourthey

  2. sld says:

    Thanks for the great post! worked perfectly. :)

  3. Natural says:

    this was exactly what i needed. thanks. my info was not in sidebar.php

  4. Morgan says:

    Now, in newer versions of WordPress (2.8 currently) the information above doesn’t apply, so I am now looking to do changes to the Sidebar and the Meta area in particular, in a WordPress 2.8 installation, and I can’t seem to figure it out. Have you been able to?
    If I find anything I will post it here.
    Thanks again.

  5. Morgan says:

    never mind I found your updated information here on your site, THANKS!
    , sorry to bother.

  6. Minare says:

    It is in default widgets php file

  7. Freddie Cook says:

    I have tried using Chrome OS in one of my desktop PC’s, the overall performance is above average to excellent -

Speak Your Mind

Tell us what you're thinking...