{"id":5410550,"date":"2014-10-22T00:02:43","date_gmt":"2014-10-22T00:02:43","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/recent-posts-widget-broken\/"},"modified":"2016-08-22T03:41:31","modified_gmt":"2016-08-22T03:41:31","slug":"recent-posts-widget-broken","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/recent-posts-widget-broken\/","title":{"rendered":"Recent Posts widget Broken"},"content":{"rendered":"<p>I used this plugin to add the following action to my site:<\/p>\n<blockquote>\n<p>\nadd_filter(&#8216;widget_posts_args&#8217;,&#8217;modify_widget&#8217;);<\/p>\n<p>function modify_widget() {<br \/>\n    $r = array( &#8216;cat&#8217; =&gt; &#8216;6&#8217; );<br \/>\n    return $r;<br \/>\n}<\/p>\n<\/blockquote>\n<p>I wanted to make the WP native Recent Posts widget populate only one category. <\/p>\n<p>It didn&#8217;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&#8217;t find the code in my functions.php to fix the issue.<\/p>\n<p>(I tried removing &amp; replacing the widget, deactivating the plugin, and searching the php&#8230;all to no avail.)<\/p>\n<p>Anyone know what&#8217;s wrong? I have no idea even where to start looking. \ud83d\ude41<\/p>\n<p>Thanks for your help.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/add-actions-and-filters\/<\/p>\n","protected":false},"template":"","class_list":["post-5410550","topic","type-topic","status-closed","hentry","topic-tag-categories","topic-tag-php","topic-tag-widget"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5410550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5410550\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5410550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}