• I used this plugin to add the following action to my site:

    add_filter(‘widget_posts_args’,’modify_widget’);

    function modify_widget() {
    $r = array( ‘cat’ => ‘6’ );
    return $r;
    }

    I wanted to make the WP native Recent Posts widget populate only one category.

    It didn’t work, so I removed the PHP code from the plugin. However, now the Recent Posts widget is broken (will not show up on frontend), and I can’t find the code in my functions.php to fix the issue.

    (I tried removing & replacing the widget, deactivating the plugin, and searching the php…all to no avail.)

    Anyone know what’s wrong? I have no idea even where to start looking. 🙁

    Thanks for your help.

    https://ww.wp.xz.cn/plugins/add-actions-and-filters/

The topic ‘Recent Posts widget Broken’ is closed to new replies.