Show comments in Wordpress category?

justsmallsteps

New member
Joined
Mar 11, 2014
Messages
29
Points
0
I'm trying to add comment form from single page in WP into categories page but it didn't work although I added
<?php comments_template( '', true ); ?>
Are there any ways to show comments in Wordpress category?
 

freds86

New member
Joined
Mar 13, 2014
Messages
81
Points
0
I'm trying to add comment form from single page in WP into categories page but it didn't work although I added

Are there any ways to show comments in Wordpress category?
Go to category.php file in your wordpress theme and add these codes
Code:
<?php
$wp_query->is_single = true;
comments_template();
$wp_query->is_single = false;
?>
This makes wordpress think it's on staying single page or page query so It will show comment box/comments as your requirements.
 

justsmallsteps

New member
Joined
Mar 11, 2014
Messages
29
Points
0
@freds86
It worked as well. Comment box showed but comments displayed on post page instead of category page :(
 

msWendy

New member
Joined
Mar 13, 2014
Messages
26
Points
0
msWendy
Wordpress is only support comments for posts and pages, not categories. If you're afraid of duplicating comment on categories and posts, just hiding comment template command on single page and still show on categories, that's would help you solve the problem. :eek:
 
Older threads
Replies
9
Views
4,473
Replies
1
Views
3,830
Latest threads
Replies
4
Views
27
Replies
2
Views
40
Replies
5
Views
37

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top