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.


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

  1. 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 post list - wordpress showposts - wordpress list all posts - show time on wordpress post - list recent posts wordpress - list all post in one page wordpress - show comments on wordpress blog - show articles on page wordpress plugin - wordpress display comments on posts - wordpress leave a response or trackback - wordpress how to show trackbacks on website - wordpress showing comments on blog - article list in page wordpress - list all posts wordpress - show comments immediately under a post wordpress - showing comments worpdress - show pings trackbacks list - wordpress list post by author - wordpress list articles - show all posts wordpress archive showposts - wordpress + show posts with comments - wordpress comments shown - remove trackbacks n pings for wordpress theme - wordpress show article with last comment - wordpress show comments - 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 -