WordPress.org

Ready to get started?Download WordPress

Forums

comment_author_link (3 posts)

  1. marmelade
    Member
    Posted 9 years ago #

    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.

  2. Kafkaesqui

    Posted 9 years ago #

    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; ?>

  3. marmelade
    Member
    Posted 9 years ago #

    Thank you! =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.