• For reasons I don’t really understand, the body first function was causing a parse error. I split up the test and everything is fine now (see the new code for the function below). With this fix, the plugin does exactly what I want — hopefully Jaka can update the plugin (maybe it is a WP2.7.1 issue?) so others can take advantage of it too.

    Thanks!!

    function ncop_comments_open_filter($open, $post_id=null)
    {
        if($open) {
           $post = get_post($post_id);
           if($post->post_type !== 'page') {
               return true;
           }
        }
        return false;
    }

    http://ww.wp.xz.cn/extend/plugins/no-comments-on-pages/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: No Comments On Pages] Fix for “Parse error when activating”’ is closed to new replies.