Show comments in Wordpress category?

Joined
Mar 11, 2014
Messages
38
Best answers
0
Ratings
3
Points
8
#1
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?
 
Joined
Mar 13, 2014
Messages
49
Best answers
0
Ratings
2
Points
0
#2
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.
 
Joined
Mar 11, 2014
Messages
38
Best answers
0
Ratings
3
Points
8
#3
@freds86
It worked as well. Comment box showed but comments displayed on post page instead of category page :(
 
Joined
Mar 13, 2014
Messages
16
Best answers
0
Ratings
3
Points
0
#4
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:
 

Malcolmjr96

Moderator
Staff Member
Joined
Apr 18, 2016
Messages
419
Best answers
4
Ratings
100 9
Points
28
#6
Just checking in! Have you found an answer to your question?
 
Latest Threads
Replies
3
Views
46
Replies
2
Views
46

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

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