ThemeShaper Forums » Thematic

[closed]

Comment Bubble

(2 posts)
  • Started 6 years ago by violetabella
  • Latest reply from ScottNix
  • This topic is not resolved
  1. violetabella
    Member

    HI! I've been trying to implement a comment bubble to my child theme, but not having much luck. I did try this tutorial,

    http://mrdanadams.com/2011/css-only-comment-count-bubble-in-wordpress/

    but the bubble did not show up (even on the posts with comments).

    Is there another way to go about doing this?

    Posted 6 years ago #
  2. The PHP code that goes into your functions.php file works fine for me. Did you at least see the number of comments show up?

    I have a feeling you missed the part that mentions the CSS he has listed is actually SASS, which is a different kind of automated way of doing CSS that requires stuff you probably don't want to get in to yet. It won't work if you just paste it into the style.css file. He however does link to the article showing how to make the comment bubbles. So you will just need to figure out what to label the CSS and you should be good.

    He also doesn't mention how to remove it from the post footer, with just the code from his site, you will still get the comment number in the bottom of the post (except on single pages). For that, use

    function childtheme_override_postfooter() {
    	global $id, $post;
    
    	if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */
    		$postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink();
    		$postfooter .= "</div><!-- .entry-utility -->\n";
    	} elseif ($post->post_type == 'page') { /* For logged-out "page" search results */
    		$postfooter = '';
    	} else {
    		if (is_single()) {
    			$postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postconnect();
    		} else {
    			$postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags();
    		}
    		$postfooter .= "</div><!-- .entry-utility -->\n";
    	}
    
    	// Put it on the screen
    	echo apply_filters( 'thematic_postfooter', $postfooter ); // Filter to override default post footer
    }

    And after that, you will still have a | showing after the Category/Tags, so you can hide that with CSS .meta-sep-comments-link { display: none; }. I would say you could remove that too, but you would have to mess with the tags function, which if you exclude tags... you will then get the same problem on the Category (which will show the tags sep). So I would just hide it with CSS to save time.

    Posted 6 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.