• Resolved smuffle89

    (@smuffle89)


    i have limited coding experience so if you answer, “dumb it down” lol.

    i don’t even know if this is possible but here it goes: I need to know if there is someway for me turn the commenting option on and off for certain pages. Before you glare at me thinking, “That’s a stupid question,” there’s more: I want to know how to possibly erase that “Comments are turned off” thing that appears at the bottom when you click the option of turning comments off. Is there any type of code I could stick in my page.php to make this possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • There is a Discussion Tab at the bottom of each Edit Post/Page page. If your WP pages are comment-enabled, you should be able to untick the “Allow comments” box to turn off comments on a page-by=page basis

    With regard to the “Comments are turned off” line, you first need to find out which file is generating this massage and where. Could be comments.php or could be page.php. Once you can report back on this with the relevant code snippet, people should be able to help you further.

    Thread Starter smuffle89

    (@smuffle89)

    thanks esmi:

    the code snippet is contained in my comments file. I’ve found where they both are. They’re in if-else statements. same question still applies. here’s each code snippet:

    <?php else : // If there are no comments yet ?>
    	<p><?php _e('No comments yet.'); ?></p>
    <?php endif; ?>
    <?php else : // Comments are closed ?>
    <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
    <?php endif; ?>

    In that case, try deleting:

    <p><?php _e('No comments yet.'); ?></p>

    and

    <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>

    which should just leave you with:

    <?php else : // blah blah blah ?>
    <?php endif; ?>

    in each case.

    Thread Starter smuffle89

    (@smuffle89)

    thankyou!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘inquiry about page commenting functions’ is closed to new replies.