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.

New Articles

Incoming Search Terms for the Article

how to list wordpress pingback automatically - wordpress show comments for a post - wordpress how to list all comments for a post - wordpress blog post show - list post links wordpress - list of trackback wordpress - off trackback email notification - show comments in post wordpress - wordpress show posts - wordpress show comments in post - wordpress show posts comments in one - "show trackback" wordpress - article list via blogs - by post author wordpress 2.86 - wordpress post list - comments not displaying + wordpress - url of post and show blogs on wordpress - display all title list wordpress - wordpress get comment associated post - wordpress themes show comments after post - wordpress show one response to post - show all posts wordpress - show list posts - split wordpress posts - wordpress +list all posts - wordpress page to show post list in columns - wordpress list post - wordpress only show comments not pings - list posts in wordpress - list post wordpress - wordpress do not show pingback - wordpress allow pings - wordpress show all posts - comments not posting + wordpress - list posts wordpress - wordpress get post comments -