Forums

[resolved] No Pingbacks and comments on page template (2 posts)

  1. skritz
    Member
    Posted 1 year ago #

    Dear WordPresser,

    I made a page template. It shows posts from a special category.
    But with the code <?php comments_template(); ?> comments had not been shown.

    So I inserted the following and the comemnts worked fine.

    <?php global $withcomments; $withcomments = true;
    	comments_template( '', true ); ?>

    But now I saw, that a new comment is not connected to the page. It's connected to the last post, shown on that page.

    So also no Pingbacks are being shown.

    Has anybody an idea how to change the comment function, that it will connect the comemnts with the page?

    Would be great to hear some ideas.

    Yours, Skritz

  2. skritz
    Member
    Posted 1 year ago #

    Solved it.

    I'v put a wp_reset_query(); right before the comments template tag. Now it looks like this

    <?php wp_reset_query(); ?>
    <?php comments_template( '', true ); ?>

    And is working now perfect.

Topic Closed

This topic has been closed to new replies.

About this Topic