samdoidge - design, development and stats
Filed under

Code

 

The CSS Rollover

THIS is great if your looking to do an image rollover.

I never liked having to bloat a page javascript for an image rollover so this is perfect.

Disqus Number Of Comments Not Showing Up On A Single Wordpress Post

This is a repost. (I don't use Disqus comments anymore but got this out of old Wordpress database to help some people)

My link showing the number of comments on a post was not displaying for a single post, it would just say "Comment", but was displaying correctly on the index page "0 Comments" - zero being the prevalent prefix on my site. There are a few possible solutions mentioned out there like:

  • placing <?php wp_footer(); ?> just before </body> in your footer.php
  • checking 'Check this if you have a problem with comment counts not showing on permalinks' within disqus plugin advanced settings.

None of these solutions worked for my problem.

The Solution:

On line 272 of the DISQUS plugin in disqus.php (accessible via dashboard - plugins - editor), it has the following:

} else if ( (is_single() || is_page() || $withcomments || is_feed()) ) {

change this line to:

} else if ( (is_page() || $withcomments || is_feed()) ) {

This solved the problem for me. Thanks to Steve O'Hear from this thread

Another solution:

From Andres Climent:

You can also add the following to you theme's functions.php file: 

<?php remove_filter('comments_number', 'dsq_comments_number'); ?>