MiL0
Forum Replies Created
-
I get the same problem – I re-grant the permissions and it works.. but only for a short period. I then have to re-grant the permission again.
I found a solution on this very forum!
Was looking for a solution for this, but didn’t want to go the “all or nothing” approach outlined above. My solution is this:
Step 1
Create a new custom field called “allow_comments” and on any pages I want comments give that custom field a value (1, true, allow, whatever).Step 2
Open up your theme’s page.php and find the following line:
<?php comments_template(); ?>
Replace with:<?php $allow_comments = NULL; $allow_comments = get_post_meta($post->ID,'allow_comments', false); ?> <?php if ($allow_comments[0]) { comments_template(); } ?>
This checks to see if the page has a value for the allow_comments custom field. If it does, it displays the comments.
With this in place in the page.php file (and not in the single.php file), by default it will not display comments for pages. But by adding the allow_comments custom field with (any) value, the comments mechanism can be quickly enabled for any page.
Hope that helps someone else.
I’ve done step 2 which completely fixes the problem but I don’t really understand step 1. Where do I create a new custom field?
ah well, with the help of a friend I worked out that it’s because I disabled the comments section in page.php:
<!--<?php comments_template(); ?>-->
re-enabling comments made the theme work properly again in IE/Chrome.
any ideas how I can disable comments without messing everything up?