Log in Sign up

Adding Commento on the main page

I'm using Commento, but the problem is that it is lacking visibility. How could I add a "Comments" link under the post date on the left, on each post, on the main page? Thanks.


4 years ago, 5 replies   Edit question

To add a comments link under the post date, you will want to edit the code inside the {{#entries}} block in your template's entries.html file.

{{#entries}}
...
<a href="{{{url}}}#comments">View comments</a>
...
{{/entries}}

In order for this to work, you would need to wrap the comments themselves inside an element with the ID comments, like this:

...
<section id="#comments">
{{> plugin_html}}
</section>
...
Answered 4 years ago · Edit answer

I understand the first part of your answer, not the second part. Can you elaborate a bit more?

Answered 4 years ago · Edit answer

Did you miss that other question? I'm not sure to understand what to do...

Answered 4 years ago · Edit answer

Please excuse me – here's some more information about the second part, in which the goal is to wrap the comments in an element with the ID comments:

  1. Open up your template's entry.html file in the template editor.
  2. Locate the tag {{> plugin_html}}, it should be inside the {{#entry}} block. Then wrap it in the following HTML element:
<section id="#comments">
{{> plugin_html}}
</section>
Answered 4 years ago · Edit answer

Thanks, seems to do the job.

Answered 4 years ago · Edit answer