Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Show comments per post rather than category (http://forum.bytesforall.com/showthread.php?t=20959)

sstudebaker Sep 27, 2013 03:21 PM

Show comments per post rather than category
 
I am calling up comments on a single post page using
PHP Code:

<?php $withcomments 1comments_template(); ?>

Problem is the comments for each post show up on every post for that category. How do I limit comments to their particular post?

juggledad Sep 27, 2013 03:38 PM

how are you adding that in?

sstudebaker Sep 27, 2013 04:52 PM

I created a template file and am adding
PHP Code:

<?php $withcomments 1comments_template(); ?>

after the loop.

Here is the template code (Thanks for your help!)

PHP Code:

<?php  
/* Template Name: Single Article of the Week Post */  
list($bfa_ata$cols$left_col$left_col2$right_col$right_col2$bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header(); 
extract($bfa_ata); 
global 
$bfa_ata_postcount;
?>

<div id="interior_wrapper">
<?php
    $year 
date("Y");
    
$month date('n');
    if ((
$month == 1) || ($month == 2)) $year $year 1;
    
$page_title get_the_title();
    
$page_title get_post_meta($post->ID'bfa_ata_body_title'true);
    
$page_title str_replace(' Game'''$page_title);
?>

<div id="content_wrapper" style="float: left; width: 760px">
    <div class="post-headline">    
        <h1><?php echo $page_title ?></h1>
    </div>

    <div id="page_content" class="clearfix">
        <?php if (have_posts()) : while (have_posts()) : the_post();?>
        <?php the_content(); ?>
        <?php endwhile; endif; ?>
    </div>
</div>

<div id="sidebar_wrapper">
<div id="sidebar_content">
<h2>Articles</h2>
<style>
#sidebar_content ul { list-style-type: none; padding: 0px; margin: 0px; }
#sidebar_content li { margin-bottom: 4px }
</style>
<ul>
<?php query_posts(array('cat'=> '3','showposts'=>'17','order'=>'DESC','orderby'=> 'title','orderby'=> 'post_date')); ?>
<?php 
while (have_posts()) : the_post(); 
    
$post_id get_the_ID(); 
    
$page_title get_the_title();
    
$page_title str_replace(' Game'''$page_title);
    
?>
    <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo $page_title?></a></li>
<?php endwhile; ?>
</ul>
</div>
</div>

<div style="clear: both">
<?php $withcomments 1comments_template(); ?>
</div>

</div>

<?php get_footer(); ?>


juggledad Sep 28, 2013 05:39 AM

You should use index.php as the base for your template. Unfortunately, to figure out what is going on, I'd have to spend more time that I currently have avaliable due to my paying customers.

sstudebaker Sep 28, 2013 10:11 AM

If I wanted to stick with what I have what would you need $ wise to look at it?


All times are GMT -6. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.