• I really don’t know what it is, but I can’t seem to make an image also a link with the_author_link. It works with every other link I try, but as soon as I try the_author_link, it messes up.

    This is the code I’m using:

    <?php if ( get_post_meta($post->ID, 'profile', true) ) { ?>
    
    <div class="profile_img_home"><a href="<?php the_author_link(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/profile/<?php echo get_post_meta($post->ID, "profile", $single = true); ?>" alt="<?php the_author(); ?>" /></a></div>
    
    <?php } ?>

    To see what happens with the link, please just look at my home page where I have it applied. To the right of the post title, I have the images I’m trying to make a link, which sends you to the website the post author has specified in their profile. For some reason, this link doesn’t wrap around the image and when you hover the link, it tells you that it will take you to: https://think-theory.com/<a href=

    Not sure what’s going on here. Any help is greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mithrustt

    (@mithrustt)

    Come on, surely someone knows what’s going on here.

    Thread Starter mithrustt

    (@mithrustt)

    Dang it, I’ve tried so many different things, but nothing works. Why does it seem this isn’t possible?

    What is your home page? I’d like to take a look. I think your problem is that you’re trying to anchor an already anchored link. Try using the_author_url instead of the_author_link. That way it’s not hot on its own.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the_author_link’ is closed to new replies.