• Below is what I have for my index.php file but for some reason it won’t pull the comments template. Any ideas?


    <?php get_header(); ?>

    <!--Begin Content-->

    <div id="current_photo">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="photo" id="post-<?php the_ID(); ?>">
    <?php the_excerpt(); ?>

    </div><!--Close DIV.photo-->

    </div><!--Close DIV#current_photo-->

    <div id="ajax_info_comments">
    <div id="info_comment_drawer" style="display:none;">

    <div id="info">

    <div class="post_meta_data">
    <p class="posted_date">Posted on <?php the_date(); ?>
    <p class="posted_categories">Filed Under | <strong><?php the_category('| '); ?></strong>

    </div><!--Close DIV.post_meta_data-->

    <div class="description">
    <?php the_content(); ?>
    </div>

    </div><!--Close DIV#info-->

    <div id="comments">
    <?php comments_template(); ?>
    </div>

    </div><!--Close DIV#info_comment_drawer-->

    <div class="pull_tab">
    <a href="#bottom">info+comments</a>
    </div><!--Close DIV.pull_tab-->

    </div><!--Close DIV#ajax_info_comments-->

    <?php endwhile; ?>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>

    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The comments template is there:
    http://www.spyderfcs.com/archives/2006/02/10/for-alexis/

    You are just lacking the link to comments, something like this:
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'), 'commentlink'); ?>

    Thread Starter spyderfcs

    (@spyderfcs)

    Thanks for the reply but the above code is for a different site I’m building, not my blog. It’s a photo blog so on the index.php page I have a photo and then also want to display the comments section for the photograph.

    So I don’t think I need the comments_popup_link tag since I’m not trying to link to another page but instead just want the comments section to show up on the front page.

    Know what I mean?

    Thread Starter spyderfcs

    (@spyderfcs)

    You know…I just realized that it’s not possible to display the comments for a post on the index.php page since it doesn’t contain the comments for that particular post but rather just shows one of the posts.

    Is there a way to have it look like it’s on the index.php page (so the address will still show… http://www.mywebsite.com ) but it will actually be loading something like (http://www.mywebsite.com/archives/2006/02/12/post-title/)?

    Thread Starter spyderfcs

    (@spyderfcs)

    I think I found a solution!

    In case anyone is looking for info on this subject…

    Look here: http://numist.net/blog/comments-on-index/

    Cool, thanks for that link to ScottLog!

    I was just surfing trying to find out how to get comments on to the front page of my site too. Thanks!

    Dan
    [moderated: no signature links etc. please!]

    The link is broken. Anyone have more info on this subect?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Calling comments_template() in the index.php’ is closed to new replies.