Skip to content

Instantly share code, notes, and snippets.

@mfields
Created February 15, 2013 21:11
Show Gist options
  • Save mfields/4963583 to your computer and use it in GitHub Desktop.
Save mfields/4963583 to your computer and use it in GitHub Desktop.
A very good way to display comments_popup_link() in a WordPress theme.
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link(
__( 'Leave a comment', 'mytheme' ),
__( '1 Comment', 'mytheme' ),
__( '% Comments', 'mytheme' )
); ?></span>
<?php endif; ?>\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment