Comments on: Exclude Trackbacks from Recent Comments Listing http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing Web design & development work of Stefan Matei Mon, 15 Mar 2010 14:52:16 +0000 http://wordpress.org/?v=abc hourly 1 By: Jack Harten http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-10692 Jack Harten Wed, 20 Jan 2010 01:56:41 +0000 http://www.vileworks.com/?p=230#comment-10692 <p>Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I'm more of a visual learner,I found that to be more helpful well let me know how it turns out. This is good...thanks for sharing</p> Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out. This is good…thanks for sharing

]]>
By: JamesD http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-4521 JamesD Thu, 11 Jun 2009 17:56:22 +0000 http://www.vileworks.com/?p=230#comment-4521 Thanks for the useful info. It's so interesting Thanks for the useful info. It’s so interesting

]]>
By: Stefan http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-630 Stefan Wed, 07 Jan 2009 20:42:13 +0000 http://www.vileworks.com/?p=230#comment-630 <p>Yeah, I think that's what they thought when they made the SQL syntax... On the <a href="http://www.w3schools.com/Sql/sql_where.asp" rel="nofollow">SQL page</a> from the w3schools website "<>" is defined as the "not equal" operator.</p> Yeah, I think that’s what they thought when they made the SQL syntax…
On the SQL page from the w3schools website “<>” is defined as the “not equal” operator.

]]>
By: Ray Fowler http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-627 Ray Fowler Wed, 07 Jan 2009 17:02:39 +0000 http://www.vileworks.com/?p=230#comment-627 I think I get it. So does mysql interpret <> as "less than or greater than a value" which works out to the same as "not equal" (!=)? I think I get it. So does mysql interpret <> as “less than or greater than a value” which works out to the same as “not equal” (!=)?

]]>
By: Stefan http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-626 Stefan Wed, 07 Jan 2009 15:49:48 +0000 http://www.vileworks.com/?p=230#comment-626 <p>@<a href="#comment-625" rel="nofollow">Ray Fowler</a>: Yes... I just tested this out, mysql accepts both <code><></code> and <code>!=</code>.</p> <p>I used <code><></code> to keep it consistent with other queries they had in "FreePress Recent Comments Widget"... That's what they were using.</p> @Ray Fowler: Yes… I just tested this out, mysql accepts both <> and !=.

I used <> to keep it consistent with other queries they had in “FreePress Recent Comments Widget”… That’s what they were using.

]]>
By: Ray Fowler http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-625 Ray Fowler Wed, 07 Jan 2009 14:19:46 +0000 http://www.vileworks.com/?p=230#comment-625 Hmmm, I noticed in your code example, you have <pre>AND user_id <> '1'</pre> instead of <pre>AND user_id !='1'</pre> I think that should be an = rather than an <>. Hmmm, I noticed in your code example, you have

AND user_id  <> '1'

instead of

AND user_id !='1'

I think that should be an = rather than an <>.

]]>
By: Ray Fowler http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-624 Ray Fowler Wed, 07 Jan 2009 14:14:56 +0000 http://www.vileworks.com/?p=230#comment-624 Very cool! I am glad I was able to help back. Very cool! I am glad I was able to help back.

]]>
By: Stefan http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-623 Stefan Wed, 07 Jan 2009 07:28:41 +0000 http://www.vileworks.com/?p=230#comment-623 <p>@<a href="#comment-615" rel="nofollow">Ray Fowler</a>: And I did :) no more will my own comments show up in the footer.</p> <p>Thanks.</p> @Ray Fowler: And I did :) no more will my own comments show up in the footer.

Thanks.

]]>
By: Stefan http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-622 Stefan Wed, 07 Jan 2009 07:12:35 +0000 http://www.vileworks.com/?p=230#comment-622 <p>@<a href="#comment-615" rel="nofollow">Ray Fowler</a>: You're welcome. For some reason your comment ended up in spam.</p> <p>And you've got an interesting point about not listing your own comments. I might use that myself.</p> @Ray Fowler: You’re welcome. For some reason your comment ended up in spam.

And you’ve got an interesting point about not listing your own comments. I might use that myself.

]]>
By: Ray Fowler http://www.vileworks.com/exclude-trackbacks-from-recent-comments-listing/comment-page-1#comment-615 Ray Fowler Mon, 05 Jan 2009 19:35:49 +0000 http://www.vileworks.com/?p=230#comment-615 Thanks, this is exactly what I was looking for. I am using WordPress 2.7 and the built in Recent Comments Widget. I was getting trackbacks and pingbacks in my sidebar, but I added your code to wp-includes/widgets.php and now they are filtered out perfectly. By the way, I also added this piece of code which filters out my own comments from the sidebar. That way when I reply to a whole bunch of comments, I am not the only one showing up in the sidebar. Besides, I would rather highlight my guests rather than myself. Here is the code: Changed: <pre>$wpdb->comments WHERE comment_approved='1'</pre> to: <pre>$wpdb->comments WHERE comment_approved='1' and user_id !='1'</pre> Thanks again! Ray Thanks, this is exactly what I was looking for. I am using WordPress 2.7 and the built in Recent Comments Widget. I was getting trackbacks and pingbacks in my sidebar, but I added your code to wp-includes/widgets.php and now they are filtered out perfectly.

By the way, I also added this piece of code which filters out my own comments from the sidebar. That way when I reply to a whole bunch of comments, I am not the only one showing up in the sidebar. Besides, I would rather highlight my guests rather than myself. Here is the code:

Changed:

$wpdb->comments WHERE comment_approved='1'

to:

$wpdb->comments WHERE comment_approved='1' and user_id !='1'

Thanks again!
Ray

]]>