Remove rss widget title link

You are trying to modify a built-in widget. Unfortunately for you there is no easy solution to get the results you desire. As you figured out already, there is no filter hook to modify the whole title output.

How to get the results?

  1. Create your own Widget extending WP_Widget_RSS where you overwrite the parents method widget with your designated method. Then replace the build-in version with yours.

    Some help to get you started:

    class WP_Widget_RSS_Custom extend WP_Widget_RSS {
        public function widget($args, $instance) {
            // Copy parent function and modify to your needs…
        }
    }
    
    add_action('widgets_init', 'widget_WP_Widget_RSS_Custom_init');
    
    function widget_WP_Widget_RSS_Custom_init() {
        unregister_widget('WP_Widget_RSS');
        register_widget('WP_Widget_RSS_Custom');
    }
    
  2. Create a JS based solution, that modifies the widget after DOM is ready.

Leave a Comment