• I made a blog template to show the blog post on one page. But it can’t show the comments, can someone help me? This is my code:

    <?php
    /*
    Template name: Portfolio
    */
    ?>
    
    <?php get_header(); ?>
    <h1><?php the_title(); ?></h1>
    	<div id="wrapper">
    <?php
    global $post;
    global $more;
    $myposts = get_posts('numberposts=6&category=1');
    foreach($myposts as $post) :
    setup_postdata($post);
    $more  = 0;
    ?>
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content(__('(more...)')); ?>
    <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    <?php endforeach; ?>
    
    		</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t show comments’ is closed to new replies.