Background behind comment number?
-
I am trying to put a background behind my comments link at the bottom of the post. Specifically, I would like a small shape behind the number (let’s say 10) of comments, while the word “comments” would sit outside of the shape. I would like the number to be centered within the shape. I have tried editing the functions.php file to include a span around the 0, 1, and %, so I can style them with a background, but that doesn’t work. It constrains the background element to the exact size of the number. In addition, I’m not sure how I would center the number if I could get the background to show up.
Here’s what my functions.php segment looks like, if that helps.
case 'comments': if(!comments_open()) break; ob_start(); comments_popup_link( __( '0 Comments', THEME_NS ), __( '1 Comment', THEME_NS ), __( '% Comments',THEME_NS ) ); $result[] = art_get_meta_icon('comment-number-background', 43, 26) . ob_get_clean();
Any suggestions? Am I looking in the wrong place?
- The topic ‘Background behind comment number?’ is closed to new replies.