• Resolved superspiker

    (@superspiker)


    This was pretty easy in versions prior to 2.8 but it seems that it’s different now…

    I used to follow these simple instructions found here: Remove WordPress Meta

    Any idea’s on how to remove these links in 2.8?

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • They kinda rearranged a few things but you can find the what you’re looking for here: wp-includes/default-widgets.php between lines 282 and 302. It should look pretty familiar.

    -gofortyz

    Thread Starter superspiker

    (@superspiker)

    thanks!

    hi,
    i followed all the threads of this discussion, but my question remains- how do you remove the RSS and Meta widgets from the sidebar for 2.8?

    i’m working with the default-widgets.php file (understand this is new for 2.8) but i’m confused exactly how to alter the code? i’ve tried just about everything.

    PLEASE HELP! THANKS!!!

    (i’m pasting below the area of code that i have been trying to alter – am i even on the right track??)

    /**
    * Meta widget class
    *
    * Displays log in/out, RSS feed links, etc.
    *
    * @since 2.8.0
    */
    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;
    ?>

    <?php
    echo $after_widget;
    }

    function update( $new_instance, $old_instance ) {
    $instance = $old_instance;
    $instance[‘title’] = strip_tags($new_instance[‘title’]);

    return $instance;
    }

    function form( $instance ) {
    $instance = wp_parse_args( (array) $instance, array( ‘title’ => ” ) );
    $title = strip_tags($instance[‘title’]);
    ?>
    <p><label for=”<?php echo $this->get_field_id(‘title’); ?>”><?php _e(‘Title:’); ?></label> <input class=”widefat” id=”<?php echo $this->get_field_id(‘title’); ?>” name=”<?php echo $this->get_field_name(‘title’); ?>” type=”text” value=”<?php echo esc_attr($title); ?>” /></p>
    <?php
    }
    }

    meltzerthorne,

    By “remove the RSS and Meta widgets from the sidebar for 2.8” I assume you mean you want to remove those particular links from the sidebar Meta widget itself? If so, then yes, you can simply remove the code you’ve identified. Alternatively you could use <!– some code –> to comment them out. Keep in mind though that if and when you upgrade to the next version of WP you will also update the /wp-includes directory thus overwriting the defaults-widgets.php file, so make a backup copy.

    If on the other hand you are not using the Meta sidebar widget, these same links may be contained in sidebar.php file of your theme. If so, then simply remove or edit them there.

    Hope this helps…

    holly heck,

    i just removed on line in the widgets.php file that you guys were talking about and now i have white screen of death.

    i put the code line back in and uploaded it and still have white screen.

    man, i am so $#@ over wordpress. so difficult to do simple things.

    Antistandard,

    If you are using a version before WP v2.8, then the file you need to edit is */wp-includes/widgets.php. Else, if you are using v2.8, you need to edit default-widgets.php

    I suspect when you pasted your code back in you may have misplaced or neglected a semi-colon or perhaps the PHP close ?> tag? Anyway just replace the entire file from a fresh WP install and you should be good to go.

    This doesn’t seem to work in 2.8.6…

    Removed the lines, cleared cache and so on, but no changes.

    This totally worked.
    Edited /wp-includes/default-widgets.php file at line 296
    Original code

    <?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="https://www.ads-software.com/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">www.ads-software.com</a></li>
    <?php wp_meta(); ?>

    Edited version commented-out unwanted code

    <?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="https://www.ads-software.com/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">www.ads-software.com</a></li>
      -->
    <?php wp_meta(); ?>

    I can confirm 3r1c’s comment above to work fine for me on version 2.9.2

    This worked great for me in 2.92 as well. Thank you!!!

    Hello
    My question is. If you need to modify any file under the wp-includes folder, then you will lose this changes whenever you update to the next WordPress version. As far as I see it, it would be easier if this code default-widgets.php was under wp-content, right? Otherwise, am I missing anything?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to remove RSS links from Meta Widget in 2.8’ is closed to new replies.