Disable comments on blog?

Hi, is it possible to disable comments from the blog? This is a basic option we expected to find under blog settings.

Thanks!

1 Like

Don’t think that feature exists.

Do you think it is interesting for everybody? Can we insert an enhacement in github?

Sure!

While this feature is still pending, there is a simple workaround in the meantime: add this to your website theme CSS:

.blog-comments {
  display: none;
}
4 Likes

Thnx a lot…recently spam increased a lot

Thank you @lasalesi!

frappe@ubuntu:~/frappe-bench$ find . -name '*.css' | xargs grep blog-comments
./apps/frappe/frappe/public/css/website.css:.blog-comments {
./sites/assets/css/frappe-web.css:.blog-comments {

You’re welcome :wink: as far as I know you only need to change the first and the run bench build to update the latter occurrence… Note that changing this will force you into a branch; consider setting this property either from a website script or another way configurable… We did not send in a PR because this is only a hotfix that completely disables this feature…

I have just noted that this was broken in V12. This is a new workaround, based on the Website > Website Script, which is configurable and achieves the same:

<!-- hide blog comments -->
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.blog-comments { display: none }';
document.getElementsByTagName('head')[0].appendChild(style);