• 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

    #comments, #respond {
    display: none !important;
    }

    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.

    • This topic was modified 3 years, 1 month ago by Steven Stern (sterndata). Reason: moved URL
    • This topic was modified 3 years, 1 month ago by Sirmadsen.
    • This topic was modified 3 years, 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    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.

    Thread Starter Sirmadsen

    (@nesdam1981)

    You sir, are a god among men… This did the trick and saved me a ton of headache finding proper plugins xD

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide comment form on blog posts (not woocommerce)’ is closed to new replies.