php - Comments don't display in custom template -
i'm coding custom template wordpress 3.5.1 on local machine. came section need add together comments added next index.php page <?php comments_template(); ?> have included <?php wp_footer(); ?> , <?php wp_header(); ?> back upwards wordpress plugins. when check page out can't see comments, default 1 (i checked exists in database). there missing? can impact display of comments? need include additional stuff?
also it's single page website static content (i edited header , footer display dynamic content title, meta info etc.., 1 page website decided utilize static content, not sure if has issue). hence there 1 page on server index.php users see, i'm not sure if issue, comments related post? still think should @ to the lowest degree see comment form on page.
is there way associate post?
you need query post want , build loop. pretty simple.
$args = array( 'p' => 188 // works on server; utilize whatever id need ); $qry = new wp_query($args); if ($qry->have_posts()) { while ($qry->have_posts()) { $qry->the_post(); comments_template(); } } that should bring comments post choose.
you may need enqueue comment-reply if isn't loading on page already.
http://codex.wordpress.org/class_reference/wp_query
php html wordpress wordpress-theming
No comments:
Post a Comment