Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Display comments in categories? (wordpress)
Old 04-02-2011, 11:08 AM Display comments in categories? (wordpress)
BorisTheSpider's Avatar
Junior Talker

Posts: 4
Name: Boris Karlsson
Location: Sweden
Trades: 0
I would like to display comments on category pages (wordpress blog). Currently my categories show 3 posts in full - except for the comments. It only gives the option to add comments and show how many comments have been left. I know this is the default. But how do I change it?

I figure I only need to tweak the index.php? First of all here's the original code from my theme:

Quote:
<?php get_header(); ?>
<?php get_sidebar(); ?>

<!-- Content -->
<div id="content">

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Post -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-date"><?php the_time('F d, Y') ?></div>
<div class="post-title" style="text-align: center;">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-title-info">Posted by: <?php the_author() ?> : Category: <?php the_category(', ') ?></div>
<div class="clear"></div>
</div>
<div class="post-entry">
<?php the_content('Read more...'); ?>
</div>
<div class="post-info">
<?php comments_popup_link('Comments (0)', 'Comment (1)', 'Comments (%)'); ?> : <a href="<?php the_permalink() ?>#respond">Add Comment</a>
</div>
</div>
<!-- /Post -->
<?php endwhile; ?>
<!-- Navigation -->
<div class="navigation">
<div class="navigation-previous"><?php next_posts_link('« Previous Entries') ?></div>
<div class="navigation-next"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<!-- /Navigation -->
<?php else : ?>
<!-- Post -->
<div class="post">
<div class="post-title">
<h2>Not Found</h2>
</div>
<div class="post-entry">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
</div>
<!-- /Post -->
<?php endif; ?>

<div class="clear"></div>

</div>
<!-- /Content -->

<?php include (TEMPLATEPATH . '/sidebar-right.php'); ?>
<?php get_footer(); ?>
Simply going by the code of the single.php I deleted the comment pop up part and replaced it with this (right under <?php the_content('Read more...'); ?>):

Quote:
<?php get_header(); ?>
<?php get_sidebar(); ?>

<!-- Content -->
<div id="content">

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Post -->
<div class="post" id="post-<?php the_ID(); ?>">
<div class="post-date"><?php the_time('F d, Y') ?></div>
<div class="post-title" style="text-align: center;">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-title-info">Posted by: <?php the_author() ?> : Category: <?php the_category(', ') ?></div>
<div class="clear"></div>
</div>
<div class="post-entry">
<?php the_content('Read more...'); ?>
<?php edit_post_link('Edit this entry.','',''); ?>
<?php comments_template(); ?>
</div>
</div>
<!-- /Post -->
<?php endwhile; ?>
<!-- Navigation -->
<div class="navigation">
<div class="navigation-previous"><?php next_posts_link('« Previous Entries') ?></div>
<div class="navigation-next"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<!-- /Navigation -->
<?php else : ?>
<!-- Post -->
<div class="post">
<div class="post-title">
<h2>Not Found</h2>
</div>
<div class="post-entry">
<p>Sorry, but you are looking for something that isn't here.</p>
</div>
</div>
<!-- /Post -->
<?php endif; ?>

<div class="clear"></div>

</div>
<!-- /Content -->

<?php include (TEMPLATEPATH . '/sidebar-right.php'); ?>
<?php get_footer(); ?>
Well, this doesnt work. The funny thing is that the added "edit this entry" function does show on the categories now but the comments dont. Of course it also doesnt show the pop up option anymore just like I wanted it. So what am I missing? Is there something else in wordpress or my theme that may be suppressing the comments display on categories? I cant seem to find anything in the index.php, comments.php or functions.php that may lead to that conclusion. But maybe its something else? Also, Ive tried to find a plugin that would do this but no luck...does anyone know of one? Like an enhanced category or comments plugin. Thanks for any help!
__________________
«An interesting journey never follows a straight path» — Marjan van den Belt
Check out my
Please login or register to view this content. Registration is FREE
Blog.
BorisTheSpider is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Display comments in categories? (wordpress)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18549 seconds with 12 queries