WordPress.org

Ready to get started?Download WordPress

Forums

New Theme | Comments (and other functions) not working (5 posts)

  1. sashen
    Member
    Posted 7 years ago #

    I created my first template at http://www.sashen.com/blog/ and when I click on Comments, no comment box appears. I have comments.php in the template folder, but no luck.

    If I use the default template, comments work fine.

    On another note (possibly related?), when I use the search box, the results don't seem to use my template properly.

    Any help is very much appreciated.

  2. moshu
    Member
    Posted 7 years ago #

    Is there a call for the comments template file in your single or index file? (depending on which one you are using for displaying single posts)

    EDIT. And BTW, it's theme not template. Many template files build up a theme.

  3. sashen
    Member
    Posted 7 years ago #

    I meant to say theme... oops.

    I don't have a single.php file... and the index.php is copied from the default theme.

    So what I'm assuming is a call for the comments template file is this section in index.php:

    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

  4. moshu
    Member
    Posted 7 years ago #

    That code displays the link, like "No comments".
    That is NOT the call for the comments template.
    Look again in the default - single.php! It should look something like:
    <?php comments_template(); ?>

  5. sashen
    Member
    Posted 7 years ago #

    Moshu,

    Thanks for the pointers and pardon my VERY newbie questions... I'm *starting* to get this ;-)

    Okay, so I added/edited single.php (and edited search.php to fix the formatting problem I mentioned, above)... but now when I click on the post or try to add a comment, I'm don't understand why the text in the single post is so much wider than it is in /blog/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags