The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

If author_has_url (4 posts)

  1. idbehold
    Posted 11 years ago #

    Is there something like this, I'm trying to do what Josh is doing with comment author's URLs, however when I setup my php up like so:

    {cite}{a href="{?php comment_author_url(); ?}"}{?php comment_author(); ?}{span} : {?php comment_author_url(); ?}{/span}{/a}{/cite}

    It will make the author's name linked even if they didn't enter a URL for their site, instead it links to the page you are currently on. Any advice?

  2. Kafkaesqui

    Posted 11 years ago #

    I use something similar to the following:

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

  3. idbehold
    Posted 11 years ago #

    Did I ever tell you how much I love you?

  4. Kafkaesqui

    Posted 11 years ago #

    You never needed to. But it's always nice to hear...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.