WordPress.org

Forums

[resolved] Errors relating to comments (3 posts)

  1. posiesplace
    Member
    Posted 9 years ago #

    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??

  2. Kafkaesqui

    Posted 9 years ago #

    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(); } ?>

  3. posiesplace
    Member
    Posted 9 years ago #

    Thanks! All working fine now!

Topic Closed

This topic has been closed to new replies.

About this Topic