Archived topic
Disabling comments on the homepage does not work
9 replies · Started by Miklos on January 2, 2022
Not sure if this is an issue with generate press or wordpress, but I'm trying to remove the comments box from the homepage by unchecking "Allow Comments" from the "Discussion" dropdown, but the comments box remains.
Any help would be appreciated
Site is added to private comments
Hi Miklos,
by unchecking “Allow Comments” from the “Discussion” dropdown
Do you mean the Discussion section in the page editor?
If so, can you try disable all your plugins except GP premium to test?
So turned off all (3) other plugins:
Contact form 7
GenerateBlocks
WPShowposts
and the comment section remains on the homepage, even though I unchecked "Allow discussion"
Screenshot for reference:
https://www.dropbox.com/s/a5z0r2r3m6mqrar/comments-disabled.jpg?dl=0
I can hide it with css, but its strange that it won't go away when I uncheck the box (Through "Edit page")
GP doesn't have a specific control to turn on or off the comment, the allow comment in the page editor is a WP feature, so it's unlikely a theme issue.
Are you using a child theme? If so, can you switch to parent theme to test?
Let me know :)
I am using a child theme, and in fact turning the child theme off does fix the issue.
I'm guessing that means its something in the customized functions.php file causing it?
Hi there,
that sounds like the issue.
If you can isolate each function in the child theme functions.php and remove them one by one you should be able to find which is the cause.
So I think I found the source, but not the cause.
I've been struggling with a mystery caching issue while updating the css, and i just discovered if I upload a empty functions.php and re-upload the same custom functions.php then the cached css gets replaced.
I also noticed that it fixed the page options issues not working. Edit, ok I was mistaken about this. What happened was my css to fix this was being cached.
It's definitely the functions.php file that is causing the page options to not work, though. And its also causing some weird caching.
Was wondering if you could have another glance over it to see if anything jumps out that might break the page options or cause the caching?
Hi there,
If you can share the entire contents of the problematic child theme's functions.php, we can check it out to see for any potential issue that may be related to this.
You can put the code contents and share the github gist with us. :)
https://gist.github.com/
Got this sorted out actually!
Nice one! thanks for letting us know. Glad you got it sorted. :D