WordPress.org

Support

Support » Your WordPress » comment_author_link

comment_author_link

  • How do I make links popup in a new window? I’m using; comment_author_link, and can’t find a place to put “target=_blank” anywhere.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try something like this:

    <a target="_blank" href="<?php comment_author_url(); ?>"><?php comment_author(); ?></a>

    For more robust handling:

    <?php if(!get_comment_author_url()) : ?>
    <?php comment_author(); ?>
    <?php else : ?>
    <a href="<?php comment_author_url(); ?>" target="_blank"><?php comment_author(); ?></a>
    <?php endif; ?>

    Thank you! =)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘comment_author_link’ is closed to new replies.
Skip to toolbar