Want to change your meta links contained in a WordPress sidebar widget?
Image may be NSFW.
Clik here to view.
[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 }