WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Errors relating to comments

[Resolved] Errors relating to comments

  • I have created 2 pages which I which included as links in my sidebar. I managed to get the pages working in the side bar but when I enter into my nice new pages I find this at the bottom of the page

    Warning: comments_template(/home/.dickie/”my domain”/wp-content/themes/iris): failed to open stream: Success in /home/.dickie/”my domain”/wp-includes/comment-functions.php on line 42

    Warning: comments_template(/home/.dickie/”my domain”/wp-content/themes/iris): failed to open stream: Success in /home/.dickie/”my domain”/wp-includes/comment-functions.php on line 42

    Fatal error: comments_template(): Failed opening required ‘/home/.dickie/”my domain”/wp-content/themes/iris’ (include_path=’.:/usr/local/lib/php’) in /home/.dickie/”my domain”/wp-includes/comment-functions.php on line 42

    I don’t want to have any comments appearing on these pages as they are info pages only. When I created these pages I specifically unchecked the allow comments on the discussion side bar. How do I correct this problem??

Viewing 2 replies - 1 through 2 (of 2 total)
  • With the Iris theme, remove the following line from the Main Index template (index.php):

    <?php comments_template( is_single() ); // Get comments.php template ?>

    If you need comments on posts but not Pages, just adjust (or rather, correct) that line to:

    <?php if(is_single()) { comments_template(); } ?>

    Thanks! All working fine now!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Errors relating to comments’ is closed to new replies.