Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Show wpDiscuz comments on custom page/php file

4 Posts
2 Users
0 Reactions
2,610 Views
(@emreguler)
New Member
Joined: 6 years ago
Posts: 4
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#5466]

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: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@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');
}



   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@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