試試吧。我已經給我的author.php文件使用。
<?php
/**
* The template for displaying Author Archive pages.
*
* @package WordPress
*/
get_header(); ?>
<?php
if (have_posts())
the_post();
?>
<h1><?php printf(__('Author Archives: %s'), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url(get_the_author_meta('ID')) . "' title='" . esc_attr(get_the_author()) . "' rel='me'>" . get_the_author() . "</a></span>"); ?></h1>
<?php
// If a user has filled out their description, show a bio on their entries.
if (get_the_author_meta('description')) : ?>
<?php echo get_avatar(get_the_author_meta('user_email'), apply_filters('avatar_size', 60)); ?>
<h2><?php printf(__('About %s', 'theme'), get_the_author()); ?></h2>
<?php the_author_meta('description'); ?>
<?php endif; ?>
<?php
rewind_posts();
get_template_part('loop', 'author');
?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
它重定向到作者的帖子頁面,在這種情況下,它不存在。給出404錯誤。 WP slug就像'murali-prashanth',沒有空格,所以這個鏈接有問題。你在哪裏得到它?無論如何,請確保您的所有帖子都是作者。關於個人資料,只需使用它創建一個模板頁面。 –
有一個專門用於Wordpress的Stack Exchange站點:http://wordpress.stackexchange.com/ –