The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
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
Can't use wpDiscuz ...
 
Notifications
Clear all

Conflict [Solved] Can't use wpDiscuz with a custom WordPress theme

3 Posts
2 Users
1 Reactions
4,897 Views
Posts: 2
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
(@stormk)
New Member
Joined: 3 years ago
[#6567]

Hello. I installed wpDiscuz on my website, and successfully tested it with Twenty Twenty-Two.

However, when I switch to my custom WordPress theme, the following Javascript is missing (cut for privacy and readability reasons):

<script src='.../wp-includes/js/comment-reply.min.js?ver=6.1.1' id='comment-reply-js' type="text/javascript"></script>
<script id='wpdiscuz-combo-js-js-extra' type="text/javascript">
var wpdiscuzAjaxObj = {"..."};
var wpdiscuzUCObj = {"..."};
</script>
<script id='wpdiscuz-combo-js-js-before' type="text/javascript">
...
</script>
<script src='https://wpdiscuz.com/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz-combo.min.js?ver=7.5.2' id='wpdiscuz-combo-js-js' type="text/javascript"></script>

As a result, the comments are visible but none of the buttons work.

How can I append the necessary Javascript to the footer of a custom theme? Can't find any documentation that covers this.

Thanks.


2 Replies
Asti
Posts: 8217
 Asti
Support
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
(@asti)
Illustrious Member
Joined: 8 years ago

Your WordPress theme footer PHP file (for this custom post type) must contain <?php wp_footer(); ?> function to allow all plugins to load JS files and scripts.

 

Please check and make sure it exists.


Posts: 2
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
(@stormk)
New Member
Joined: 3 years ago

Thank you for the help. <?php wp_footer(); ?> was already present.

Upon further inspection, I realized that the problem was some code I added to my functions.php: I moved Jquery from the head to the footer to speed up loading times, and as a result wpDiscuz was trying to load before Jquery.

You can mark this as closed.
Have a nice day 🙂


Share: