Author Link Going to Home Page Instead of Author Page
-
On my site we have multiple authors. I followed the directions that I found here on how to set this up but something is wrong. When you hover over each link it says https://www.sitename.com/blog/author/authorname/ but when you click on it you go to the home page.
I was able to set it up so under each post (except on home page) it displays the Author’s Name and that would link to an author profile page with:
<p>Written by <?php the_author_posts_link(); ?> | <?php the_time('F j, Y'); ?> </p>
Then I created an author.php file:
<?php get_header(); ?> <div id="content"> <div id="contentleft"> <!-- This sets the $curauth variable --> <?php if(isset($_GET['author_name'])) : $curauth = get_userdatabylogin($author_name); else : $curauth = get_userdata(intval($author)); endif; ?> <h3>About: <?php echo $curauth->display_name; ?></h3> <p><strong>Website:</strong> <a href=”<?php echo $curauth->user_url; ?>”><?php echo $curauth->user_url; ?></a></p> <p><strong>Profile:</strong> <?php echo $curauth->user_description; ?></p> <h3>Posts by <?php echo $curauth->display_name; ?>:</h3> <ul> <!– The Loop –> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li> <a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”> <?php the_title(); ?></a> </li> <?php endwhile; else: ?> <p><?php _e(’No posts by this author.’); ?></p> <?php endif; ?> <!– End Loop –> </ul> </div> <?php include(TEMPLATEPATH."/sidebar_right.php");?> </div> <!-- The main column ends --> <?php get_footer(); ?>
What am I missing?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Author Link Going to Home Page Instead of Author Page’ is closed to new replies.