Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Show wpDiscuz comments on custom page/php file

4 Posts
2 Users
0 Reactions
2,094 Views
(@emreguler)
New Member
Joined: 6 years ago
Posts: 4
Topic starter  

Can I show "wpDiscuz comments & comment form template of a post" in a custom page / php file? 

P.S.= I tried to use comments_template(); and it's not working.


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6444
 

Hi @emreguler,

Please check the points mentioned in this doc:

https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/missing-comment-form/


   
ReplyQuote
(@emreguler)
New Member
Joined: 6 years ago
Posts: 4
Topic starter  

@astghik , sorry, I forgot to mention that. I already checked that page. Let me tell you more details.

Everything is fine on single post page of that post type. But I want to show the comments of a post on different page. I did it with the codes below. Comments are showing but with default wordpress comments template instead of wpDiscuz...

global $post, $withcomments;
$post = get_post(7617);
$withcomments = 1;
if ( comments_open() && get_comments_number() ) {
     comments_template();
}else{
     _e('Henüz profilinize hiç yorum yapılmamış', 'egrandevu');
}

This post was modified 5 years ago 2 times by emreguler

   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6444
 

@emreguler,

then you should use the is_load_wpdiscuz hook and return true for the custom post types.

An example can be found here: https://beta.wpdiscuz.com/docs/codex/filters/is_load_wpdiscuz/

 

 


   
ReplyQuote
Share:
Scroll to top