Support » Plugins and Hacks » [Plugin: Disqus Comment System] How to remove View Comments?

  • Is there a way to prevent Disqus from changing the wordings of the comments link on index and single post?

    Before I installed the latest version of Disqus, the comments link in each post of my blog used to say “Comments” and “#” (where # is the number of comments).
    But now it says “View Comments” for both, which makes my blog look very unaesthetic. For some posts, it changes to “View Comments” and “# Comments and # Reactions”.

    Any help would be very appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Anyone?

    Please?

    seferov

    (@seferov)

    Hi,

    From Plugin Editor select Disqus Comment System. In disqus.php file find
    ‘<span class="dsq-postid-’.$post->ID.‘">View Comments</span>’;
    and replace with
    ‘<span class="dsq-postid-’.$post->ID.‘">’.$comment_text.‘</span>’;

    Doesn’t work. Now it just says ’.$comment_text.‘ on the page.

    Plus when I click on “View Comments” (or whatever I may replace it with) it doesn’t take me anywhere.

    @cyberquil
    since 2.60 it doesn’t work.

    try the following line:
    return '<span class="dsq-postid">' . $post->comment_count . '</span>';

    if ( dsq_can_replace() ) {
    		return '<span class="dsq-postid" rel="'.htmlspecialchars(dsq_identifier_for_post($post)).'">View Comments</span>';
    	} else {
    		return $comment_text;
    	}
    }

    If I leave the above version as is, then below all the headlines on my index page I get the correct comment count as specified in index.php:

    ‘<?php comments_popup_link(‘Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?>’

    Clicking on it produces a URL ending in …/#disqus_thread and it leads to the Disqus comment section. So the index page works fine.

    On my single post page, however, all I get is “View Comments” and clicking on it gives a URL that ends in …/#respond that leads nowhere UNLESS I put an ‘< a name=”respond”>’ anchor tag in the Disqus comments.php file.

    If I apply your suggestion and modify the code to this:

    ‘if ( dsq_can_replace() ) {
    return ‘<span class=”dsq-postid”>’ . $post->comment_count . ‘</span>’;
    } else {
    return $comment_text;
    }
    }’

    I get “View Comments” under the headlines on my index page (= NO comment count), although clicking on it still leads to the comment section, and under the headline on my single post page I get a plain number, such as “2” without the word “comments”. Clicking on it still leads nowhere without the additional respond anchor tag.

    experiencing the same problem here –

    lets make some magic happen with this –

    The magic that ultimately worked for me was to put a check mark next to “Output JavaScript in footer” under Advanced Options in the Disqus Dashboard.

    @seferov man you are king… it just took 1 second for me to solve the error… God bless u….

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Disqus Comment System] How to remove View Comments?’ is closed to new replies.