Advertisement
alchymyth

comment bubble

Dec 12th, 2011
1,458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. how to transfer the comment bubble from Twenty Eleven to a child theme of Twenty Ten
  2.  
  3. edit this line in loop.php of the child of Twenty Ten:
  4.  
  5.                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
  6.  
  7. change to:
  8.  
  9.                 <span class="comments-link"><?php comments_popup_link('<span class="leave-reply">Reply</span>', '1', '%' ); ?></span>
  10.  
  11.  
  12. copy this from style.css of Twenty Eleven:
  13.  
  14. /* Comments link */
  15. .entry-header .comments-link a {
  16.     background: #eee url(images/comment-bubble.png) no-repeat;
  17.     color: #666;
  18.     font-size: 13px;
  19.     font-weight: normal;
  20.     line-height: 35px;
  21.     overflow: hidden;
  22.     padding: 0 0 0;
  23.     position: absolute;
  24.     top: 1.5em;
  25.     right: 0;
  26.     text-align: center;
  27.     text-decoration: none;
  28.     width: 43px;
  29.     height: 36px;
  30. }
  31. .entry-header .comments-link a:hover,
  32. .entry-header .comments-link a:focus,
  33. .entry-header .comments-link a:active {
  34.     background-color: #1982d1;
  35.     color: #fff;
  36.     color: rgba(255,255,255,0.8);
  37. }
  38. .entry-header .comments-link .leave-reply {
  39.     visibility: hidden;
  40. }
  41.  
  42. remove the `.entry-header` from all the above styles, and add to style.css of  the Twenty Ten child theme.
  43. also add this line:
  44.  
  45. .hentry { position: relative; }
  46.  
  47. copy /images/comment-bubble.png from Twenty Eleven;
  48. and paste into the /images folder of the Twenty Ten child theme.
  49.  
  50. possibly adjust the positioning:
  51.  
  52. top: 1.5em;
  53. right: 0;
  54.  
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement