2016-04-28 70 views
0

如何返回静态页面以及作者的归档页面上的帖子? 我们的网站使用博客区的信息内容和帖子页面的静态页面。作者页面获取作者的帖子和页面

非常感谢您提前。

+1

您可以使用WP_Query查询职位,并可以在https://developer.wordpress.org/reference/classes/wp_query经过文档/ 以供参考 –

回答

0

只需在主题目录中创建一个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

相关问题