La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
Just as an update here @roman-nich's code was perfectly valid but there was an issue on our end that was returning comment_count as 0 even if a post had comments.
{% set post = content_by_id(YOUR BLOG POST ID) %}
{{ post.comment_count }}
{{ post.comment_list }}
For example in the code above, if there was a comment on a post, the comment_count would return 0 and the comment_list would be an empty array. This has now been fixed up so that comment_count should return your comment number and your comment_list should return an array of the comments on the post.
I tried this one, and it returned me a zero. I thought that it might be issue with approving of these comments, but all comments approved and the count display correctly on the single page itself.
Hey @roman-nich do you have an example blog post that you could link me to where you tried adding that snippet in so that I can take a closer look? Feel free to send me a direct message if that is easier.
Just as an update here @roman-nich's code was perfectly valid but there was an issue on our end that was returning comment_count as 0 even if a post had comments.
{% set post = content_by_id(YOUR BLOG POST ID) %}
{{ post.comment_count }}
{{ post.comment_list }}
For example in the code above, if there was a comment on a post, the comment_count would return 0 and the comment_list would be an empty array. This has now been fixed up so that comment_count should return your comment number and your comment_list should return an array of the comments on the post.
Sorry for hijacking this topic, but this issue seems to be related to my problem. We're creating a custom blog post template, which has related blog posts displayed under the content. The related posts are displayed using the tag related_blog_posts. Otherwise it works fine, but just like in the previous example, post.comment_count is always zero and post.comment_list is an empty array.
I guess I can use content_by_id() if this is by design.