Can you Delete the Comment Section on Certain Pages?

Neil August 9, 2012

In my public space I want to delete the comment section all together. Not just an individual comment but the whole block/section. Is this possible?

6 answers

1 accepted

4 votes
Answer accepted
Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2012

Hi there,

You could do this in two method depending on how many pages do you want to hide the comment section are. If you want the whole space to hide the comment section on that space's pages then you could do the following steps

  1. Navigate to the preferred space
  2. Browse >> Space Admin
  3. Click Stylesheet on the left hand panel under the heading "Look & Feel"
  4. Click Edit and Paste the following CSS
  5. <style>
    #comments-section
    {
    display:none;
    }
    </style>
  6. Save
  7. Confluence will hide the comment section to all content under the space

If you want Confluence to hide the comment section only for a particular page, you could do the following steps

  1. Access your administration page
  2. Navigate to "User Macros" under the "Configuration" section
  3. Create a User Macro
  4. Configure the Macro Name and Title (Example: hide)
  5. Choose "No Macro Body" as the definition of the macro
  6. Under the template input the following lines
    <style>
    #comments-section
    {
    display:none;
    }
    </style>
  7. Save
  8. Go to the page necessary
  9. Put the newly created macro at the page that you want the comment section to be hidden

Hope it helps.

Cheers,
Septa Cahyadiputra

Neil August 10, 2012

Can't seem to get either to work

Neil August 10, 2012

In the first set of instructions my stylesheet under "Look & Feel" is PDF Stylesheet and I put in there and nothing happened.

As for the second set of instructions it worked and will be good enough for what I am doing, but the section area is still seen it just has nothing in it. It would be nice if I could remove that alltogether.

Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 10, 2012

Yup, basically the CSS could only hide it instead of removing the section. In regards to the stylesheet, please input it under the Space's stylesheet instead of PDF stylesheet.

Administering a Space

Hope it helps.

Cheers,
Septa Cahyadiputra

Zachary Hayes October 1, 2019

This worked great for me. I also had to add

## @noparams

to the macro before it would show up in my macros, should anyone as inexperienced with macros as I am run into that.

1 vote
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2012

David had a AJS javascript for manipulating the comment order, and you can tweak it and get rid of comments. Here is the link https://answers.atlassian.com/questions/28999/is-it-possible-to-reverse-the-order-in-which-comments-appear

You will need to stuff this into the space template I assume to make it specific only for one space.

Neil August 10, 2012

Whats the tweak? I want to remove that whole comment section...So that no one would ever know it existed. I plan on creating another section and embed Disqus in it.

0 votes
Paul Streng June 24, 2021

Did not work

0 votes
Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Hi Neil,

You can use built in scripts from script runner plugin to bulk delete comments from one or more pages, you can also specify comment age or delete all. Hope this helps.

See this for more details: - https://scriptrunner.adaptavist.com/5.0.5/confluence/builtin-scripts.html

Regards,

Priyanka Lavania

0 votes
Susan Woster January 30, 2014

Thanks Septa, this is great!

0 votes
J. Caldwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2012

On just one page, or with in a whole space(multiple pages with multiple comments)?

Neil August 10, 2012

Primarily the whole space. But individual pages would be helpful.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events