Create guest author page via php

Custom fields don’t have an archive template so you may wish to consider using a custom taxnomy, where the terms are the names of your guest authors. I think this is quicker and easier than messing around with custom templates on pages, less code wrangling and complexity. Naturally if you have lots of posts with … Read more

the_author function is displaying wrong name and url

Sorry, but I found the answer very quickly myself and I attempted to delete this original question, but I think maybe somebody else may need this answer. This is right code to solve this issue: <h1 class=”page-title”> <?php echo ‘<a href=”‘.get_author_posts_url(get_userdata($posts[0]->post_author)->data->ID).'”>’.get_userdata($posts[0]->post_author)->data->display_name.'</a>’; ?></h1>

Customise Author Page?

You will need something like this in your author.php file. Taken from the Codex. http://codex.wordpress.org/Author_Templates <?php get_header(); ?> <div id=”content” class=”narrowcolumn”> <!– This sets the $curauth variable –> <?php $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); ?> <h2>About: <?php echo $curauth->nickname; ?></h2> <dl> <dt>Website</dt> <dd><a href=”https://wordpress.stackexchange.com/questions/157033/<?php echo $curauth->user_url; ?>”><?php echo $curauth->user_url; ?></a></dd> <dt>Profile</dt> <dd><?php … Read more

Show the most recent post for an author on the author page

Basic debugging… $current_author = get_query_var(‘author’); var_dump($current_author); … would reveal that $current_author is a string, not an object. The problem is that you are trying to use the string as an object in the query. get_posts( ‘author=”.$current_author->id.”&posts_per_page=1&order=DESC&orderby=post_date’ ); Change $current_author->id to $current_author and the query works. $author_posts = get_posts( ‘author=”.$current_author.”&posts_per_page=1&order=DESC&orderby=post_date’ );

Which page is referring to *all posts by author*?

please refer to the codex: http://codex.wordpress.org/Template_Hierarchy#Author_display however, your problem is caused by a conflict of the .author class output by the body_class() and this existing style in custom.css: .author { float: left; margin-top: -3px; width: 219px; background: #E7ECEF; border-right: 1px solid #D6DFDC; height: 41px; cursor: pointer; } check why this style is added there in … Read more