Look at the body tag on a post. For example:
<body class="bp-nouveau post-template-default single single-post postid-645 single-format-standard theme-flatsome woocommerce-demo-store woocommerce-no-js boxed header-shadow bg-fill lightbox nav-dropdown-has-arrow nav-dropdown-has-shadow nav-dropdown-has-border catalog-mode no-prices zombify-light wpf-default wpft- aa-prefix-thron- no-js">
So, precede your CSS with the right classes. Try
.post-template-default #comments, .post-template-default #respond {
display: none !important;
}
If that doesn’t work, compare the body classes on a post and product and pick out the right one.
You sir, are a god among men… This did the trick and saved me a ton of headache finding proper plugins xD
Thanks!
(@nesdam1981)
4 years, 4 months ago
Hi,
As title say I’m looking for a way to hide (not disable) the comment form on my WP blog. The problem I have right not is that if I use the only code I could find that helped a little is that it also hides the Woocommerce ratings, since apparently it uses the comment function.
Reason to why I just want to hide is that I still need the function to show how many comments are on a post, I’m using a forum for comment system with a link on the blog post redirecting the users to the proper forum post. If I disable comments the “1 comment”, “2 comments” etc. function also is disabled even if I manually make comments on a blog post from admin (which is kinda dumb, if a post hava a comment is has a comment!)
Anyway, the code I’m using is
Which as I said also hides the review form on Woocommerce, I want to Only hide on blog posts.
Any help on this? You can see what it looks like on my site.
The page I need help with: [log in to see the link]