WordPress.org

Ready to get started?Download WordPress

Forums

Adding comments bubble to custom theme (7 posts)

  1. nickharambee
    Member
    Posted 2 years ago #

    Hi,

    I have designed a custom theme for WordPress, which you can see here.

    I would like to add the comments bubble from the Twenty Eleven theme to my theme, and it looks like this could be somewhat complicated. I am wondering if someone can post the instructions for how to do so here or a link to a tutorial. I have done some searching but haven't turned up much of use.

    Thanks,

    Nick

  2. mxpimp47
    Member
    Posted 2 years ago #

    I have just done this. Its pretty easy. One problem I am having is just displaying the number of comments. If none I want a blank bubble. I have tried inserting this code from the codex with no luck -

    link to code

    this is the code that all is needed for the comment bubble to work.-

    link to code

    any help with just displaying the number would be greatly appreciated!

  3. JarretC
    Member
    Posted 2 years ago #

    nickharambee ---

    You would go into /twentyeleven/images and grab the comment-bubble.png file from in there and move it into your theme.

    Create a DIV for it to be displayed in...

    <div class="comment-bubble">
       <a href="<?php comments_link(); ?>">
          <?php comments_number( 'No Comments', '1 Comment', '% Comments' ); ?>
       </a>
    </div>

    Then for the CSS do something like...

    .comment-bubble {
       background-image: url('images/comment-bubble.png');
       width: 43px;
       height: 36px;
    }

    That should get you started.

    mxpimp47 ---

    You can just use comments_number() like so...

    <?php comments_number( ' ', '1 Comment', '% Comments' ); ?>

  4. mxpimp47
    Member
    Posted 2 years ago #

    I forgot to mention that I am having trouble with the intense debate comment plugin overriding the default comment view count. When im not running the intense debate comments its awesome and works fine. But Its showing right now the words "comments (0)" and I cant find anywhere to change it....

  5. mxpimp47
    Member
    Posted 2 years ago #

    I got it, when you login to intense debate, you go to settings/misc and then change the way its displayed on the count. Hope that helps anyone if they ever have the same issue I did. Thanks JarretC for your suggestion.

    @nickharambee the link to the code I sent and what JarretC said should get you running. Im sure you will want to use the same chunk of code he posted above. There is several variations of displaying comments.

  6. jummy
    Member
    Posted 2 years ago #

    Thanks a million, mxpimp47! Your little trick for displaying Intense Debate comments was very helpful!

  7. mxpimp47
    Member
    Posted 2 years ago #

    no problem jummy

Topic Closed

This topic has been closed to new replies.

About this Topic