Title: !!!Comment link Button!!!
Last modified: August 19, 2016

---

# !!!Comment link Button!!!

 *  [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/)
 * Hey everyone! I was getting feedback that the comment link on the bottom of each
   post was being ignored because it blended in to everything else.
 * Thus, I wanted to create a comment **button**.
 * I succeeded in making a button that displays the amount of comments on each post
   with the following code in index.php:
 *     ```
       <button type="button"> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></button></p>
       ```
   
 * Problem is that the button doesn’t link anywhere.
 * Simple question—-what do I have to add to make the button link to each post’s
   comments?

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936029)
 * Anybody with any insight on this?
 *  [mikokagome04](https://wordpress.org/support/users/mikokagome04/)
 * (@mikokagome04)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936031)
 * Wait a sec… isn’t there already a link generated inside the button? `comments_popup_link()`
   generally spits out an anchor tag with the single post URL already included.
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936034)
 * I dunno. For some reason the button does not do anything. It seems that this 
   code just puts the amount of comments on the button. Example: 3 Comments>>
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936065)
 * If anyone needs to see this in action….[here](http://www.thehocker.com) is a 
   link to my blog.
 * Thanks a brazillion…
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936149)
 * Please assist. Thanx.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936156)
 * …Buttons, why does it have to be buttons…?
 * Try this instead
 *     ```
       <a href="<?php comments_link(); ?>"><button type="button"><?php comments_number('No comments &raquo;','1 comment &raquo;','% comments &raquo;'); ?></button></a></p>
       ```
   
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936189)
 * Nothing Doing. Thanks for the try though. All that this code did was underline
   the text in the button. Still not linking though….
 * Anyone else with any insight?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936213)
 * Weird. When I wrap the button in [ … ](https://wordpress.org/support/topic/comment-link-button/....?output_format=md)
   it works for me. When I do it the way you posted I get a button to nowhere.
 * Good luck.
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936242)
 * Really? That’s interesting…..Doesn’t work for me…..
 * Does anyone else have any input on this topic???
 *  Thread Starter [frumgenius](https://wordpress.org/support/users/frumgenius/)
 * (@frumgenius)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936253)
 * Is anyone out there?
 *  [mikokagome04](https://wordpress.org/support/users/mikokagome04/)
 * (@mikokagome04)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936368)
 * I still don’t understand why the link isn’t working. If you still insist on a`
   <button>`, however, you could use JavaScript instead:
 * `<button type="button" onclick="javascript:location.href='<?php comments_link();?
   >'"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »');?
   ></button>`
 * It’s not the best (or most semantically correct) solution, but it should work.
 * Alternatively, why not just use CSS to style the comment link? Simply wrap the`
   comments_popup_link` template tag in a `<span>` or `<div>` and use style rules
   to duplicate a button effect.
 *  [Mugsy](https://wordpress.org/support/users/mugsy/)
 * (@mugsy)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936423)
 * Where are you placing your code? At the bottom of each post?
 * Does anyone know if this problem has been fixed (or what’s causing it)? I only
   just realized after a week (since upgrading) that my Comment links are missing.
   🙁

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘!!!Comment link Button!!!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 4 participants
 * Last reply from: [Mugsy](https://wordpress.org/support/users/mugsy/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/comment-link-button/#post-936423)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
