Notifications
Clear all

wpDiscuz displays on all pages but main

9 Posts
3 Users
0 Likes
1,801 Views
(@undeadfriend)
Active Member
Joined: 4 years ago
Posts: 5
Topic starter  

I'm using the plugin on Wordpress with Comicpress. I edited the Default Form to allow it to show on comics. Now wpDiscuz shows up under all comics, unless it's the front page. The comment form under the most current comic is still the default form, but if you visit the same comic in its archive URL it will show the wpDiscuz form. This doesn't help me give people the chance to use the new form when they are checking out the newest comic on the front page. I can't find anything on this specific problem and none of the plug ins I have look like they are interfering with it since it overall works just not under my main URL.

 

For reference this is the front page: https://undeadfriend.com/

wpDiscuz form is not showing.

What the same comic looks like in the archive: https://undeadfriend.com/comic/undead-friend-chapter-15-page-05/

wpDiscuz form is showing.

 

Is there a way to make it show on the front page? Any input is appreciated.

 

-NJ


   
Quote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

Hi @undeadfriend,

Please navigate to Dashboard > Comments > Settings > General admin page then enable the "Enable wpDiscuz on home page" option and check again. Everything should work fine. More info here: https://wpdiscuz.com/docs/wpdiscuz-documentation/settings/general-settings/#wpdiscuz_on_home_page


   
ReplyQuote
(@undeadfriend)
Active Member
Joined: 4 years ago
Posts: 5
Topic starter  

@elvina

I already had it enabled, I tried turning it off, save changes, and then on again but it still will not work on the front page. Any other tips? Thanks so much for replying!


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

@undeadfriend

Please note: the wpDiscuz comment plugin is designed for single post types (posts, pages, etc…).  It seems in your case the home page is not a single page.

Here is the hook that you should use to enable the wpDiscuz on this page.

is_load_wpdiscuz

Below is provided an example of how to load the wpDiscuz on archive pages.

add_filter('is_load_wpdiscuz', function ($isLoad) {
if (is_archive()) {
return true;
}
return $isLoad;
});

You need to do the same if the page type in your case is not an archive page. Just change the red marked condition.

You should put the code in the active theme’s functions.php file.


   
ReplyQuote
(@undeadfriend)
Active Member
Joined: 4 years ago
Posts: 5
Topic starter  

@elvina

When I try adding the code to the functions.php it's rejected both when I do the second code you showed or just the is_load_wpdiscuz hook. Is there a specific part of the file I am supposed to put that? It doesn't recognize is_load_wpdiscuz when I put it in. I have little to no experience with editing code so I am sorry if I am missing something obvious.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5908
 

@undeadfriend,

You should just add the following code at the and of the file:

add_filter('is_load_wpdiscuz', function ($isLoad) {
if (is_archive()) {
return true;
}
return $isLoad;
});

Just make sure the page you're trying to include the wpDiscuz comment form is archive page.

If the page is category page you should use this code:

add_filter('is_load_wpdiscuz', function ($isLoad) {
if (is_category()) {
return true;
}
return $isLoad;
});

Here is an article on How to (Safely) Add Code to functions.php in WordPress: https://www.rosehosting.com/blog/how-to-add-code-to-functions-php-in-wordpress/


   
ReplyQuote
(@undeadfriend)
Active Member
Joined: 4 years ago
Posts: 5
Topic starter  

@astghik

The code for archives works, but the archives were already loading it fine. How do I get the code to make it load on the front page?

 

Sorry this is taking so long, I really appreciate the help.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5908
 

@undeadfriend

Could you please send the admin login details to info[at]gvectors.com email address? We'll try to find some solution for you. 


   
ReplyQuote
(@undeadfriend)
Active Member
Joined: 4 years ago
Posts: 5
Topic starter  

@astghik

Is that the same as the log in to my account? Because I am not comfortable just giving that information out.


   
ReplyQuote
Share:
Scroll to top