Article List Manager (arlima)
[resolved] Show number of comments (7 posts)

  1. febrer
    Posted 3 years ago #


    first, congratulations for your plugin. It's awesome.

    My question is how can I display the number of comments of a post? (I use Disqus comment system). Apparently, arlima doesn't show it by default.

    Thank you.


  2. victor_jonsson
    Plugin Author

    Posted 3 years ago #


    That is correct, the number of comments is not displayed by default. You will have to write code if you want it that way. There's a lot of information about how to modify the behavior of arlima in the wiki. This issue has an answer in the FAQ as well.

    / vic

  3. febrer
    Posted 3 years ago #

    Thanks Victor,

    I write the code that appaers in the wiki in functions.php, but it does nothing.

    Can you help me?

  4. victor_jonsson
    Plugin Author

    Posted 3 years ago #

    Well... Are disqus posting the comments back to your site?

    What happens if you use this code instead:

    function arlima_comment_count($data) {
        $data['content'] = 'Changing stuff...';
        return $data;
    add_filter('arlima_article_content', 'arlima_comment_count');
  5. febrer
    Posted 3 years ago #

    Sorry, but It does nothing...

    In 'changing stuff' I write anything in special?

    Another way, this is my article.tmpl in arlima/templates (this is the default file by arlima). I see that only appaers a function to write comments in related posts, not posts in general:

    <div id="${container.id}" class="${container.class} tmpl-article">
        {{if streamer}}
            <div style="${streamer.style}" class="streamer ${streamer.type}">
                <span>{{html streamer.content}}</span>
        {{html article_begin}}
        {{include parts/top-image.tmpl}}
        {{html article.html_title}}
        {{html article.html_text}}
        {{if related}}
            <div class="teaser-related-posts">
                    {{if related.single}}
                        {{each related.posts}}
                                <a href="${this.url}" class="related">${this.post_title}</a>
                                {{if this.html_comment_stats}}
                                    <span title="Number of comments" class="num-comments">
                                        {{html this.html_comment_stats}}
    {{if sub_articles}}
        <div class="teaser-children">
            {{html sub_articles}}
    {{html article_end}}
  6. febrer
    Posted 3 years ago #

    Hello, Victor & others,

    can you reply me? This issue is not resolved .

  7. victor_jonsson
    Plugin Author

    Posted 3 years ago #

    I'm having problems helping you since the filter example is successfully tested and used in several production websites. What theme are you using? Are you using any caching plugin? Are you inserting the list using a short code and in that case have you set any filter_suffix?

    (the comment stats variable in the template is used with another filter, it will be used by the plugin Microkids related post plugin, in case you install that plugin)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic