Title: Author&#8217;s website
Last modified: August 19, 2016

---

# Author’s website

 *  [mithrustt](https://wordpress.org/support/users/mithrustt/)
 * (@mithrustt)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/)
 * I’m trying to get it so that when a certain author makes a post, a link will 
   be given to their website. I want this link to be an image link, though, and 
   not a text link. The image is unique to them and is put in the post with this
   code:
 *     ```
       <?php if ( get_post_meta($post->ID, 'profile', true) ) { ?>
   
       <div class="profile_img_home"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/profile/<?php echo get_post_meta($post->ID, "profile", $single = true); ?>" alt="<?php the_author(); ?>" /></div>
   
       <?php } ?>
       ```
   
 * Basically, they go down into the custom fields section and enter in the last 
   portion of the image location (i.e. michael.gif) and the iamge will be put in
   the post if they’ve entered that bit.
 * What I’m wondering, is how do I work this code with the_author_link? Do I put
   the code above in the brackets of the code following:
 * `<?php the_author_link(); ?>`
 * Any help is greatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [mithrustt](https://wordpress.org/support/users/mithrustt/)
 * (@mithrustt)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788407)
 * I’ve been working with in, but I still can’t quite get it. This is what I have:
 *     ```
       <?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 } ?>
       ```
   
 * Any ideas?
 *  [Jess](https://wordpress.org/support/users/jessn/)
 * (@jessn)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788408)
 * Try this. Paste it into either single.php if it’s a post, or page.php if it’s
   a page.
 *     ```
       <a href="<?php $values = get_post_custom_values("url"); echo $values[0]; ?>" title="<?php the_title(); ?>">
       				<img src="<?php $values = get_post_custom_values("image"); echo $values[0]; ?>" alt="" /></a>
       ```
   
 * The first one, called “url” will turn the image into a link. So they’d create
   a custom field called “url” and then type in the website address. Then make a
   second field called “image” (you can rename either of those if you want) and 
   paste in the image location. It’ll automatically put in those custom fields when
   they publish their post.
 *  Thread Starter [mithrustt](https://wordpress.org/support/users/mithrustt/)
 * (@mithrustt)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788519)
 * That’s what I’m trying to avoid. I don’t want to be putting a lot of extra work
   on the shoulders of the writers every time they make a post.
 * I have the image up and working now. I just want to give it the_author_link. 
   I’m just not sure how to work the link in with the image code that I posted above.
 *  Thread Starter [mithrustt](https://wordpress.org/support/users/mithrustt/)
 * (@mithrustt)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788720)
 * OK, I’ve been continually working on this and it’s really starting to bother 
   me. It seems like something so simple, and yet, I can’t get it to work. This 
   is the code I have:
 *     ```
       <?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_title(); ?>" /></a></div>
   
       <?php } ?>
       ```
   
 * You can see that I have the_author_link in there. I have this same code elsewhere
   on the site, but instead of the_author_link, I have the_permalink, and it works
   fine. So, I’m really not sure why it doesn’t work when I make this simple switch.
 * To see the problem I’m having, go here and look for the image to the right of
   the post title. You can see the link text “Michael Fox” which should be a link
   around the image instead.
 * [http://think-theory.com/metroid-prime-3-corruption/](http://think-theory.com/metroid-prime-3-corruption/)
 * Any ideas?
 *  Thread Starter [mithrustt](https://wordpress.org/support/users/mithrustt/)
 * (@mithrustt)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788734)
 * I really hate to bump, but this is starting to really bother me. I don’t get 
   what I’m doing wrong. Surely someone here can point out my stupidity by showing
   what simple thing I’ve missed. Also, if it helps, the link when hovered, shows
   up as:
 * [http://think-theory.com/whatever-the-article-title-is/<a](http://think-theory.com/whatever-the-article-title-is/<a)
   href=
 * I have no idea why it’s doing this either.
 *  [tgiokdi](https://wordpress.org/support/users/tgiokdi/)
 * (@tgiokdi)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788736)
 * I’m using “Author Exposed”
    [http://colorlightstudio.com/2008/03/14/wordpress-plugin-author-exposed/](http://colorlightstudio.com/2008/03/14/wordpress-plugin-author-exposed/)
 * you can see it in action at [http://www.myconfinedspace.com](http://www.myconfinedspace.com)
 *  [tgiokdi](https://wordpress.org/support/users/tgiokdi/)
 * (@tgiokdi)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788737)
 * all you need to do is click on the author’s name and all sorts of fun stuff comes
   up!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Author’s website’ is closed to new replies.

## Tags

 * [the_author_link](https://wordpress.org/support/topic-tag/the_author_link/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [tgiokdi](https://wordpress.org/support/users/tgiokdi/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/authors-website/#post-788737)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
