【问题标题】:Author page get posts and pages of an author作者页面获取作者的帖子和页面
【发布时间】:2016-04-28 16:47:57
【问题描述】:

如何在其存档页面上返回静态页面以及作者的帖子? 我们的网站将静态页面用于信息内容,将帖子页面用于博客区域。

非常感谢您。

【问题讨论】:

标签: wordpress author


【解决方案1】:

您只需在主题目录中创建一个author.php 页面。在该页面内,您可以根据需要编写简单的 WordPress 循环和所有静态内容...。这样,您的作者的帖子将显示在此页面上...例如,您可以以这种方式进行 ....假设我们在 author.php 页面中编写此内容;

<?php get_header();?>
 <?php 
    //all your static code and loop content will go here inside according to nature of content ...like static content with in DIVs and php content inside php tags etc
 ?>

<?php get_footer();?> 

希望这是有道理的,更多信息请访问https://codex.wordpress.org/Author_Templates

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多