WordPress.org

Support

Support » How-To and Troubleshooting » Fatal error: comments_template(): Failed opening

Fatal error: comments_template(): Failed opening

  • I am new to wp and not familiar with php but know html and css pretty well. I had a new blog hosted at xyz company. They did install of wp for me. My blog address http://hawaiian-shirt-reviews.com.
    I tried to put a couple of pages on the blog and used this code to put it in the side bar template.

    <ul>
    <?php wp_list_pages('sort_column=menu_order&title_li=<h2>' . __('Pages') . '</h2>' ); ?>
    </ul>

    Warning: comments_template(/home/hawaiian/public_html/wp-content/themes/tropical-breeze): failed to open stream: Success in /home/hawaiian/public_html/wp-includes/comment-functions.php on line 24

    Fatal error: comments_template(): Failed opening required ‘/home/hawaiian/public_html/wp-content/themes/tropical-breeze’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/hawaiian/public_html/wp-includes/comment-functions.php on line 24
    If someone could go to my blog and help me with this I would really appreciate it. Thank you.
    When I click on link to pages I get this:

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. This error might be caused by an old (pre-1.5) call for the comments.php template. Check if you have this line in your index.php:
    <?php comments_template( is_single() ); // Get wp-comments.php template ?>
    change it to
    <?php comments_template(); // Get wp-comments.php template ?>

    2. You have also some major problems with your permalinks – seemingly you altered the slugs in a way WP doesn’t like it.

    That fixed it wow thanks!
    Not sure what you mean by this.

    “seemingly you altered the slugs in a way WP doesn’t like it.”
    slugs?

    I don’t remember changing anything else other naming some directors

    What directories? In WP you don’t really have directories, only virtual ones.
    What I was referring to: if I click on the title of your post
    Care of the Hawaiian Shirts normally it would go to the “permalink” = permanent link of that post, something like:
    .../care-of-hawaiian-shirts
    but now it points to a link (having an apostrophe in it!)
    Men's-Hawaiian/3/3
    which of course gives a 404 not found error.

    Moshu
    I think I know what you mean and where the apostrophe came from. Check it now I think I fixed it. It was the permalink structure that I had used a name in. Thank you so much.

    It works now (no more 404) but – to be honest – I still don’t get the logic behind the “redirect” or whatever is… when clicking on the title. For any visitor familiar with blog things the expected behaviour when clicking on a title would be to get the “single post” view including the comments and comment form.
    But, hey, it’s your blog 🙂 you can do anything with it.

    Moshu

    Thanks for checking it out. I’m not new to blogging. I’ve been using Movable Type and Blogger. As I said I am new to wp. In MT and Blogger the title isn’t clickable the permalinks are and you do get individual pages with comment capability. Here is one of my blogs using MT
    http://www.dennisgharris.com/
    You click the permalink and get the single entry. This Hawaiian site seems to be the same except it is the title that acts as permalink, but the when I click the title I get that single post with comment ablity. I feel like I’m missing something you’re saying. Please forgive my ignorance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: comments_template(): Failed opening’ is closed to new replies.
Skip to toolbar