• Hello,
    and thank you for the great plugin. I would like to ask you if there is a way to customize the comment’s information displayed on the front-end. For instance i need only the authors name and the article the comment was posted in to be displayed and to exclude the date and the actual comment. I would appreciate your help with that.

    Thank you very much in advance.

    https://www.ads-software.com/plugins/disqus-latest-comments/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ovann86

    (@ovann86)

    Hey,

    Do you know how to add CSS styles to your website? (edit the theme styles.css, add to the bottom)

    This CSS should do the trick

    ul.dsq-widget-list .dsq-widget-comment p {
        display: none !important;
    }
    
    ul.dsq-widget-list p.dsq-widget-meta a:nth-child(2) {
        display: none !important;
    }
    
    ul.dsq-widget-list p.dsq-widget-meta {
        font-size: 0;
    }
    
    ul.dsq-widget-list p.dsq-widget-meta a {
        font-size: initial;
    }
    Thread Starter wpbot1

    (@wpbot1)

    Hey there!

    Thank you very much for the prompt response. It worked!
    But I need one more customization that CSS doesn’t work for me. I want to change the embedded url of the comments, so it redirects users to the date’s url.

    I’m searching the php files for this but i cant find my way through ??

    Thank you again,
    Natasa

    Plugin Author ovann86

    (@ovann86)

    Hey,

    There’s very little happening in the PHP – this plugin uses the JavaScript API so all the plugin does is handle the settings and puts together a URL for the JavaScript API to build the content.

    I thought about moving to the proper API but there’s another plugin that already does that. Doesnt seem like a productive use of time whilst the JavaScript one still works.

    I’m not 100% clear on what you mean about the URL, so just to clarify are you saying you would prefer the URL to link to the comment – not the page?

    e.g. this link

    https://domain.com/page/#comment-2667110650

    I never noticed the difference, but I can see why would you would want to link to the comment and not the post.

    Plugin Author ovann86

    (@ovann86)

    Do you know how to add JavaScript into your page footer?

    This script should do what you’re looking for

    (function ($) {
      'use strict';
      $('ul.dsq-widget-list li.dsq-widget-item').each( function() {
        var comment_href = $(this).find('p.dsq-widget-meta a:nth-child(2)').attr('href');
        if (comment_href) {
        $(this).find('p.dsq-widget-meta a:nth-child(1)').attr('href', comment_href );
      }
      });
    }(jQuery));

    It’s a bit hacky doing it like this, but it’s the only option with the JavaScript API.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Comments Information Displayed’ is closed to new replies.