Change WordPress Meta Widget
Want to change your meta links contained in a WordPress sidebar widget?

[2.9] If you are trying to edit the meta data that appears in the sidebar of your WordPress blog, such as removing the RSS links, find this code in /includes/default-widgets.php file and remove/comment the unwanted lines.
This is what the original class looks like:
class WP_Widget_Meta extends WP_Widget {
function WP_Widget_Meta() {
$widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );
$this->WP_Widget('meta', __('Meta'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
?>
<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>
<?php
echo $after_widget;
}
And this is my modified one:
class WP_Widget_Meta extends WP_Widget {
function WP_Widget_Meta() {
$widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );
$this->WP_Widget('meta', __('Meta'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
<?php
echo $after_widget;
}
[Pre 2.9] If you are trying to edit the meta data that appears in the sidebar of your WordPress blog, such as removing the RSS links, find this code in /includes/widget.php file and remove the unwanted lines.
This is what the original looks like:
/**
* Display meta widget.
*
* Displays log in/out, RSS feed links, etc.
*
* @since 2.2.0
*
* @param array $args Widget arguments.
*/
function wp_widget_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<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>
<?php echo $after_widget; ?>
<?php
}
And this is my modified one:
/**
* Display meta widget.
*
* Displays log in/out, RSS feed links, etc.
*
* @since 2.2.0
*
* @param array $args Widget arguments.
*/
function wp_widget_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
29 comments
Comment by joded
on July 3, 2009 at 6:50 am
Nice article
Comment by james
on July 19, 2009 at 6:10 am
Hi, thanks for the help, although, my widgets.php page looks a lot bigger than the one above and there is no code similar to the one you posted here in mine.
maybe my WP version is different. I am rockin version 2.8.1
Thanks
Comment by Agus Siswoyo
on January 28, 2010 at 2:08 pm
nice info and very helpfull…
Comment by 3 Olives
on February 23, 2010 at 11:03 pm
Thanks so much for the advice, you were the only one that clearly defined where to find the file.
After 40 minutes searching the web, I found how to remove wordpress.org from the meta section of my blog.
Thanks!
Comment by Shane
on February 28, 2010 at 5:41 pm
This looks like a really good article, but I do not have this code, I’m using 2.8.6, and my widget.php doesnt look like what you have above, any ideas, thanks.
Comment by Rajesh Patel
on March 2, 2010 at 4:07 pm
Sorry I moved from v2.7 straight to v2.9, so I don’t know what the file looks like or what you need to change.
Comment by liebesiech
on April 14, 2010 at 7:59 pm
Thanks! Was looking forever how to change this!
Comment by RTPR
on August 18, 2010 at 7:37 am
Just wanted to say thanks for the great explanation. It took me a couple of hours digging up into the wp files while trying to figure out how to customize the meta links…and then found your post, which explained things in straightforward manner, so I got the work done in less than 10 mins… thank you again for sharing this with the public
all the best
Ol
Comment by Kai
on January 10, 2011 at 5:29 am
thanks. this helps me how to remove some links on meta widget
i have just resetted my site and know how to edit this in the past, but for some reason i totally forgot about what file to edit.
thanx again
Pingback by Meta Widget szerkesztése | Running Code
on January 27, 2011 at 10:19 pm
[...] widget függvényben a ~ 300. sor körül vannak a linkek HTML formában. Bővebb info itt: http://blog.grapii.com/2009/06/change-wordpress-meta-widget/ Kategória: WordPress | A közvetlen link. ← Silverlight alapú Facebook [...]
Comment by derek
on February 7, 2011 at 6:25 pm
Thanks for posting this. I use WP 3.0.1 and this works perfectly.
Comment by ivan
on April 19, 2011 at 6:21 pm
Thank you very much!
Comment by Des
on June 10, 2011 at 4:29 am
Wow, Thank You so much! I’ve been all over the place looking for a solution for this problem and after I’d begun to resign myself to having that meta sidebar info on my blog, I found your site!
It was right where you said it would be!
Thank you for putting an end to my frustration
Comment by Sumith Harshan
on September 25, 2011 at 5:23 am
Really worked it.thank you very much!
Comment by Duy
on November 30, 2011 at 3:50 am
Thank you!
Comment by kaka
on February 1, 2012 at 2:47 pm
wow,, thanks alot ,,,you cant believe i had 24hrs looking for this,,i now finally got it done,,thank you so much…!
Comment by John
on February 17, 2012 at 7:17 pm
2/17/2012
This is addressed on many posts. Yours is the only one that understands that the code to be changed is in default-widgets.php, not widgets.php. This may not be universally true, but it is true for the 2011 theme.
Thank you very much.
Comment by Disney
on July 11, 2012 at 1:49 pm
this is great.
Comment by Elvira
on July 11, 2012 at 2:57 pm
thanks for such information.
Comment by Isabela
on July 11, 2012 at 7:37 pm
nice post.
Comment by Darcivana
on July 11, 2012 at 9:33 pm
thank you for the info.
Comment by Edite
on July 11, 2012 at 10:01 pm
cool, i love it
Comment by Deise
on July 11, 2012 at 10:39 pm
the info shared is very interesting.
Comment by Carina
on July 18, 2012 at 3:56 pm
At least the right answer!
Thanks a lot for this!
Comment by BlogSVoice
on October 12, 2012 at 6:27 pm
Very nice article
also help in mu site
Comment by Ramsey
on November 15, 2012 at 8:56 pm
Hey! Thanks so much. this really helped.
Comment by swapnil
on December 10, 2012 at 9:25 am
thanks for help.
Comment by Ana
on January 6, 2013 at 10:51 pm
Hi,
Is there anyway of achieving this without editing the core WordPress files? I would rather this be a permanent change instead of having to reapply at every update.
Thanks
Comment by Rajesh Patel
on January 9, 2013 at 2:48 pm
unfortunately no, you need to edit the core file, and continue to do so after each upgrade, providing you’re using the same theme. However you could create your oen theme and not have the widget call functions in your theme design, but that starts getting complicated.