Notifications

wpDiscuz displays on all pages but main  

  RSS

undeadfriend
(@undeadfriend)
Active Member
Joined: 2 months ago
Posts: 5
20/12/2019 1:29 am  

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)
Honorable Member Moderator
Joined: 6 months ago
Posts: 554
20/12/2019 11:45 am  

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
(@undeadfriend)
Active Member
Joined: 2 months ago
Posts: 5
22/12/2019 1:04 am  

@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)
Honorable Member Moderator
Joined: 6 months ago
Posts: 554
23/12/2019 1:32 pm  

@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
(@undeadfriend)
Active Member
Joined: 2 months ago
Posts: 5
25/12/2019 11:47 pm  

@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
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3534
26/12/2019 12:53 pm  

@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
(@undeadfriend)
Active Member
Joined: 2 months ago
Posts: 5
28/12/2019 12:58 am  

@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
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3534
28/12/2019 1:27 pm  

@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
(@undeadfriend)
Active Member
Joined: 2 months ago
Posts: 5
31/12/2019 4:15 am  

@astghik

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


ReplyQuote
Share: