• I try to add comments to my custom page template,
    so I wrote:

    <?php
    /*
    Template Name: GuitarForum
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php comments_template(); ?>
    
    <?php get_footer(); ?>

    and I get:

    Leave a Reply

    Logged in as bentalgad. Log out ?

    XHTML: You can use these tags: <abbr title=””> <acronym title=””> <b>

    <cite> ` <del datetime=””> <i> <q cite=””> <strike> </p>
    <p>(and a “leave comment box here)
    `

    Any Idea? thank’s!

Viewing 6 replies - 1 through 6 (of 6 total)
  • That’s what I would expect. What did you want to do?

    Sorry? What’s the problem?

    Think i’d have the same question(s) as mercime and esmi (sorry), what did you expect it to do?

    Thread Starter Begin

    (@bentalgad)

    ?? that’s nice.

    I thougt it was a problem (all this html tags),
    now I get it…

    anyway, after I leave a comment it does nothing,
    it just goes to a blank “wp-comments-post.php” page.

    isn’t the new comment should appear in the page that i left
    a comment to?

    all this html tags

    Does your comments.php file include the tag wp_list_comments)? If so, does that tag include a callback parameter?

    isn’t the new comment should appear in the page that i left
    a comment to?

    Depends. Is WP configured to hold comments for moderation?

    Thread Starter Begin

    (@bentalgad)

    1)my comments.php dosen’t inlude the tag wp_list_comments,
    it has:

    <?php foreach ($comments as $comment) : ?>
    
    		<li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
    			<?php echo get_avatar( $comment, 32 ); ?>
    			<cite><?php comment_author_link() ?></cite> Says:
    			<?php if ($comment->comment_approved == '0') : ?>
    			<p>Your comment is awaiting moderation.</p>
    			<?php endif; ?>
    			<p><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></p>
    			<?php comment_text() ?>
    		</li>
    
    	<?php
    		/* Changes every other comment to a different class */
    		$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
    	?>
    
    	<?php endforeach; /* end for each comment */ ?>

    2)the wp is configured to hold comments for moderation.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘add comments to custom page template’ is closed to new replies.