How to List and Show WordPress Posts That Comments and Pings Off (Not Allow)

WordPress blog publishing platform allows individual author to override global discussion setting and set whether to allow reader to post comment on the article, or whether to allow link notification (aka pingback and trackback) from other blogs at single post or page level. The feature allows all new posts and pages to be created with comments and pings on, but can always be turned off on specific posts or pages when needed.

When come to time to housekeeping, WordPress does not provide an easy way to list or show all posts or paged articles that has its comments and pings off. For blog administrators who want to see a list blog posts and articles that have forbid readers and visitors to leave comments, and stop other blogs to pingback or trackback, use the following trick to list out all posts and pages that are currently set to comment and pingback/trackback off.

Log on to the MySQL database that powers the WordPress blog, and then use the following SQL query statement to get all posts or pages that either comment is not allowed, pings (trackback and ping back) is not allowed or both.

SELECT * FROM `wp_posts` where `comment_status` <> 'open' or `ping_status` <> 'open';

Tip: To make the selection from database easier, it’s recommended to use phpMyAdmin or other GUI interface to MySQL DB.

The query above will return all row (both posts and pages in WordPress) that has either “Allow Comments” or “Allow Pings” set to off (untick). To return only articles where comments is not allowed, use only “comment_status”, or “ping_status” for articles that do not allow pingback and trackback.

Both comment_status and ping_status fields have only two easily understand values – open and closed. Open means allow, which closed means disallowed. Once the result is displayed, the posts that have one or both of the criteria can be determined, and changed if required.


2 Responses to “How to List and Show WordPress Posts That Comments and Pings Off (Not Allow)”

  1. Jane
    November 19th, 2009 02:06
    2

    Now I see which do and don’t allow pings. But I also noticed in the database that “wp_posts” also includes images (.jpg) and the images all say “closed” for ping status. There is also a column “to_ping” and a column “pinged”, which I do not know what these signify.

    So my question is – now that I know my images all say “closed” and I WANT my images to be pinged….so how to change them to “open”?

    On another note, do you know why the images would be set to “closed”?

    Thank you.

  2. Urdu Sms
    March 3rd, 2009 17:46
    1

    Great………… thanks man………………………………………..

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

wordpress show comments - wordpress post list - wordpress list post - wordpress list all posts - showposts wordpress - query post show all posts paged - remove trackbacks n pings for wordpress theme - wordpress show article with last comment - wordpress list articles in page - wordpress view "all posts" - all post in list wordpress - show all wordpress comments - show posts wordpress - trackback wordpress display - wordpress page show post list - list all comments on wordpress - show post author i comment wordpress - wordpress create list recent posts - wordpress which post to show - Allow comments on this post wodpress off - list post in page wordpress - show comments in post wordpress - show comment of each post in wordpress - show posts - WORDPRESS SHOW POST - wordpress post-list - wordpress show all post query - can i show comments after the posts on my wordpress blog - how to get my comments in wordpress to show with the posts - show author posts wordpress - wordpress "show all posts" - wordpress list posts by author - wordpress list post names - wordpress show comments on post - wordpress show Comments Off - query to find all the post which have at least one comment in wordpress - wordpress rss shows comment instead of posts - wordpress + display comments, comments off - wordpress showing chinese - show content after commenting wordpress - wordpress how to show trackbacks - wordpress comments off - show wordpress recent posts - show pingback trackback wordpress - show trackback list n wordpress - show wordpress comments in Chinese - wordpress show list of posts - wordpress comment list - how to display posts as a list in wordpress - show list of all posts wordpress -