Theme Lab Forums » Theme Support
Disqus comments with Green Ray is giving me 2 comments bubbles?
(10 posts)-
Hi All,
You'll see on our blog http://www.electricfirefly.com.au/blog that we have taken the Green Ray theme and tweaked it - so far so good. However I recently installed Disqus comments and as you can see, for some reason I am now getting 2 x comments bubbles at the top right of each post. I had a cursory look at the code using Firebug however couldn't work out how/where/why this was happening? Any advice will be much appreciated.
Posted 9 months ago # -
Like what you did with the theme!
Did some research and think I figured it out, although the Disqus WordPress documentation wasn't much help.
I believe this is a problem because the Green Rays theme doesn't use the comments_popup_link() template tag to display the comment count, but not to worry...it's easy to switch out.
Try replacing the following in index.php, single.php, archive.php, and search.php:
<div class="bubble"><a href="<?php comments_link(); ?>"><?php comments_number('0','1','%'); ?></a></div>With this...
<div class="bubble"><?php comments_popup_link('0','1','%'); ?></div>I haven't tested this yet, but I think it'll resolve your Disqus issues.
Posted 9 months ago # -
Hi Leland,
Tried substituting the suggested code however it didn't resolve the problem. I then replaced the original code and nowe for some reason when i view a single post i'm now seeing the word 'comments' as opposed to just the number (i'm pretty sure it wasn't doing this before though i could be wrong).
Thanks for helping on this, any idea what to do next?
Posted 9 months ago # -
The word "Comments" was there before on the single post templates. They say this is caused by the lack of the wp_footer() call in the footer of the theme, however that's already there. I suggest checking off this box you see on this page.
Okay, not sure why Disqus is adding an extra link in the "bubble" div which is the root of the problem, however the next best thing is to change the CSS code so a bubble doesn't show up with each link. Go into your stylesheet and replace the following:
#content .bubble { float: right; } #content .bubble a { color: #fff; font-weight: bold; font-size: 12px; display: block; height: 27px; width: 46px; background: url(images/bubble.gif) no-repeat; text-decoration: none; padding-top: 7px; text-align: center; }With this:
#content .bubble { float: right; font-weight: bold; font-size: 12px; height: 27px; width: 46px; background: url(images/bubble.gif) no-repeat; padding-top: 7px; text-align: center; } #content .bubble a { color: #fff; text-decoration: none; }This should eliminate the extra bubble problem. Again, I'm not sure why it's adding an extra link in there, but this will fix it.
Posted 8 months ago # -
Hi Leland,
Your suggested edits to the stylesheet worked perfectly - many thanks!
However, the word 'comments' is still appearing on the single post pages despite checking the box in the DISQUS advanced options - I know this falls outside your area of jurisdiction so to speak however any advice would be greatly appreciated. I've tweeted DISQUS so I'll also see what they say.
Thanks!
Posted 8 months ago # -
Cool, glad to hear it worked...probably should've coded it like that in the CSS to begin with, but didn't anticipate anyone using any plugins that would add an extra link to it.
Not really sure what to say about the "comments" thing on single post pages. Like I said, the wp_footer() tag is already in the footer of the theme, plus with that box checked (even though I'm not quite sure what that box does) it's a mystery to me.
I may fool around with Disqus later on the Demo Server to see if I can figure anything out.
Just double checking, did you use the following on single.php like I suggested in my first post?
<div class="bubble"><?php comments_popup_link('0','1','%'); ?></div>That might help. Otherwise if it's too much of a problem, might want to consider just removing the bubble on single post pages.
Posted 8 months ago # -
Hi again Leland,
I did originally substitute the code as per your suggestion in the first post, however after it didn't solve the issue i reverted to the original code. That said I swapped the code again and tried it with the mystery box both checked and unchecked - it did get rid of the 'comments' text however the bubble was left totally blank. I've removed the bubble for now - we'll see if Disqus reply to my tweet with any suggestions.
Once again, really appreciate your help with this!
Posted 8 months ago # -
Oh, that's probably because the comments_popup_link() doesn't show up on single post pages anyway. That's why I originally included the other code (with comments_link and comments_count), should've thought of that earlier.
So yeah, I'd be interested in hearing what Disqus has to say, although for now it may be best to keep the bubble removed from single post pages until they can find out why the comments_count() code doesn't display the comment number like it's supposed to.
Posted 8 months ago # -
<div class="bubble"><?php comments_popup_link('0','1','%'); ?></div>
is have to define a css file fist ?Posted 7 months ago # -
@lad389: Not really sure what you're talking about.
There is a CSS file included in this theme, along with pretty much every other WordPress theme ever made.
Posted 7 months ago #
Reply
You must log in to post.







