Wordpress作者个人资料页面URL

时间:2012-12-22 09:06:28

标签: wordpress

我的wordpress博客存在问题(http://muraliprashanth.me)一切似乎都运转正常,但问题出在每篇文章之后我会附上作者信息,如下图所示

Murali Prashanth

但是当我点击

  

查看Murali Prashanth超链接的所有帖子

它会将我重定向到此网址http://muraliprashanth.me/author/Murali%20Prashanth/ 我不知道在哪里创建作者个人资料页面或我的wordpress主题是否支持作者个人资料页面请建议我在过去3个月内努力解决此问题,非常感谢帮助。

提前致谢。

2 个答案:

答案 0 :(得分:1)

这两个链接包含有关作者个人资料链接的详细信息以及模板信息。看看你是否能够解决它。

http://codex.wordpress.org/Author_Templates http://codex.wordpress.org/Function_Reference/the_author_url

答案 1 :(得分:0)

试试吧。我已经提供了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(); ?>