:wordpress主题制作的基本模板及常用函数
<?php the_title(); ?> : 内容页(Post/Page)标题
<?php the_permalink() ?> : 内容页(Post/Page) Url
<?php the_category(‘, ‘) ?> : 特定内容页(Post/Page)所属Category
<?php the_author(); ?> : 作者(只显示作者名字,没有链接)
<?php the_author_posts_link(); ?> :作者(显示作者,并且包含链接到作者文章目录的链接)
<?php the_time(‘Y-m-d’) ?> :显示时间,时间格式由“字符串”参数决定,具体参考PHP手册
<?php echo get_post_meta(); ?> : 获取保存在 post_meta 这个表中的数据,比如输出某个 自定义字段 的内容
<?php the_ID(); ?> : 特定内容页(Post/Page) ID
<?php the_tags(‘关键字: ‘, ‘, ‘, ”); ?> :显示文章的关键字tag
<?php the_excerpt(); ?> :Post/Page 的摘要,输入文章发布页面中的摘要面板的内容