Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

CSS to always show comments (Tudor template)


AfroGunsou

Question

In the Tudor template, comments on pages are hidden and you have to click the "Leave a comment/ Show X comments" link to show the comment field and the comments. I am looking to make it so that those are displayed by default without the need to click on that link.

Anybody have any experience doing this either on Tudor, or even any other templates that do the same thing with comments, they could throw my way?

tia

Edited by AfroGunsou
Link to post
  • Answers 11
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

If anyone's figured out how to do this on CSS, would be amazing! thanks! :)

Add to Home > design > Custom CSS #blogItemCommentsContent { opacity: 1 !important; height: auto !important; } label.blog-item-comments-toggle { display: none; }  

11 answers to this question

Recommended Posts

  • 2

Go to Settings / Advanced / Code Injection and copy-paste this in the Footer section:


<script>
document.getElementsByClassName("blog-item-comments-toggle")[0].click();
</script>




Edited by tazmeah
Initial Revision
Link to post
  • 0

I am trying to do the same on the 'Charlotte' template. I tried to use the same code bit it didn't seem to do anything. Any suggestions?

Thanks in advance.

Link to post
  • 0

use your page inspector tool and look at the class name for the text that displays/hides the comments. If it's not .blog-item-comments-toggle then update that class name in the JS code supplied by tazmeah

Link to post
  • 0

For those that want a slightly cleaner approach you should check for the existence of the element first. Otherwise you will get JS errors on pages that don't have a comment section. I think the best way would be to figure this out in CSS instead of JS but in the meantime this is a cleaner approach.


<script>
 var commentSection = document.getElementsByClassName("blog-item-comments-toggle");
 if (commentSection.length){
   commentSection[0].click();
 }
</script>





Link to post
  • 0
1 hour ago, Raflehaen said:

Is it possible to show the comments box in CSS? Would be great! 

I'm also using the Tudor template: https://www.plaatsmaker.be/artikels-blog/hoe-makers-groeien

Thanks in advance!

Add to Home > design > Custom CSS

#blogItemCommentsContent {
    opacity: 1 !important;
    height: auto !important;
}
label.blog-item-comments-toggle {
    display: none;
}

 

You can send your question to my email to get detail answer. / How to Setup Password & Share URL 

-- I came back. Will answer soon.

Link to post
  • 0
5 hours ago, tuanphan said:

Add to Home > design > Custom CSS


#blogItemCommentsContent {
    opacity: 1 !important;
    height: auto !important;
}
label.blog-item-comments-toggle {
    display: none;
}

 

Thanks @tuanphan! You made my day!

Link to post
  • 0
5 hours ago, tuanphan said:

Add to Home > design > Custom CSS


#blogItemCommentsContent {
    opacity: 1 !important;
    height: auto !important;
}
label.blog-item-comments-toggle {
    display: none;
}

 

As said, thank you very much!

I was happy to see the comment box as a default, but it's not possible to comment anymore.

Do you think we can do something about this?

Tnx!

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


√ó
√ó
  • Create New...