{"id":484,"date":"2011-03-30T14:37:00","date_gmt":"2011-03-30T12:37:00","guid":{"rendered":"http:\/\/zerga.dyndns.org\/wordpress\/?p=484"},"modified":"2011-07-21T13:11:07","modified_gmt":"2011-07-21T11:11:07","slug":"wordpress-hide-pingbacks-and-trackbacks-from-recent-comments","status":"publish","type":"post","link":"https:\/\/zerga.de\/wordpress\/2011\/03\/30\/wordpress-hide-pingbacks-and-trackbacks-from-recent-comments\/","title":{"rendered":"WordPress: how to hide\/remove pingbacks and trackbacks from recent comments"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignright\" src=\"http:\/\/www.brentcsutoras.com\/wp-content\/uploads\/2008\/06\/old-wordpress.jpg\" alt=\"\" width=\"203\" height=\"191\" \/>Its pretty simple to remove pingbacks and trackbacks from your sidebar actually, but the required change is overwritten by any wordpress update since it is done directly inside the wordpress files:<\/p>\n<ol>\n<li>Open the file <em>wp-includes\/default-widgets.php<\/em><\/li>\n<li>Find line with <code>$comments<\/code><code>= get_comments( <\/code><code>array<\/code><code>( <\/code><code>'number'<\/code><code>=&gt; <\/code><code>$number<\/code><code>, <\/code><code>'status'<\/code><code>=&gt; <\/code><code>'approve'<\/code><code>) );<\/code><\/li>\n<li>Change line to <code>$comments<\/code><code>= get_comments( <\/code><code>array<\/code><code>( <\/code><code>'number'<\/code><code>=&gt; <\/code><code>$number<\/code><code>, <\/code><code>'status'<\/code><code>=&gt; <\/code><code>'approve'<\/code><code>, <\/code><code>'type'<\/code><code>=&gt; <\/code><code>'comment'<\/code><code>) );<\/code><\/li>\n<\/ol>\n<p>Your pingbacks and trackbacks should be hidden from the default recent comments widget.<\/p>\n<p>Edit: I tried stromkopf&#8217;s suggestion to use a plugin and it works perfectly. To get it, go to <a href=\"http:\/\/wordpress.org\/extend\/plugins\/get-recent-comments\/\" target=\"_blank\">http:\/\/wordpress.org\/extend\/plugins\/get-recent-comments<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Its pretty simple to remove pingbacks and trackbacks from your sidebar actually, but the required change is overwritten by any wordpress update since it is done directly inside the wordpress files: Open the file wp-includes\/default-widgets.php Find line with $comments= get_comments( array( &#8216;number&#8217;=&gt; $number, &#8216;status&#8217;=&gt; &#8216;approve&#8217;) ); Change line to $comments= get_comments( array( &#8216;number&#8217;=&gt; $number, &#8216;status&#8217;=&gt; [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[8,5],"tags":[26,154,153],"_links":{"self":[{"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/posts\/484"}],"collection":[{"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/comments?post=484"}],"version-history":[{"count":9,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":904,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/posts\/484\/revisions\/904"}],"wp:attachment":[{"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/media?parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/categories?post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerga.de\/wordpress\/wp-json\/wp\/v2\/tags?post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}