最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

posts - Closing Comments conditionally in comments.php

programmeradmin2浏览0评论

I have a website running shapely as my theme, and I am trying to allow only logged in members to see comments on a post, and restrict anyone but administrators from commenting. I would like comments to appear closed to everyone but administrators while previous comments are still visible to members.

In order to do this I just need to know how to assign a "closed for comments" value to a post, preferably from inside the comments.php file. Basically I would like to change all posts so the function: comments_open() returns false, via code.

is there any easy way to do this?

发布评论

评论列表(0)

  1. 暂无评论