能够调用的文章内容:php
调用文章标题:<?php the_title(); ?>html
调用文章内容:<?php the_content(); ?>wordpress
调用文章摘要:<?php the_excerpt(); ?>函数
调用做者姓名:<?php the_author(); ?>post
调用文章发布时间:<?php the_time(); ?>ui
调用做者的Gravatar头像:<?php echo get_avatar( get_the_author_email(), 36 ); ?>spa
调用文章内容能够写:日志
<?php echo the_content();?>
可是这个wordpress会自动在段落上加上p,解决方法能够改成下面的写法code
<?php $post=get_post(get_the_ID()); echo $post->post_content; ?>
post_author:(整数)文章做者的编号htm
post_date:(字符)文章发表的日期和时间(YYYY-MM-DD HH-MM-SS)
post_date_gmt:(字符)文章发表的格林尼治标准时间(GMT) (YYYY-MM-DD HH-MM-SS)
post_content:(字符)文章内容
post_title:(字符)文章标题
post_category:(整数)文章类别的编号。注意:该值在WordPress 2.1以后的版本总为0。定义文章的类别时可以使用 get_the_category()函数。
post_excerpt:(字符)文章摘要
post_status:(字符)文章状态(publish|pending|draft|private|static|object|attachment|inherit|future)
comment_status:(字符)评论状态(open|closed|registered_only)
ping_status:(字符)pingback/trackback状态(open|closed)
post_password:(字符)文章密码
post_name:(字符)文章的URL嵌套
to_ping:(字符)要引用的URL连接
pinged:(字符)引用过的连接
post_modified:(字符)文章最后修改时间(YYYY-MM-DD HH-MM-SS)
post_modified_gmt:(字符)文章最后修改GMT时间(YYYY-MM-DD HH-MM-SS)
post_parent:(整数)父级文章编号(供附件等)
guid:(字符)文章的一个连接。注意:不能将GUID做为永久连接(虽然在2.5以前的版本中它的确被看成永久连接),也不能将它做为文章的可用连接。GUID是一种独有的标识符,只是目前恰巧成为文章的一个连接。
post_type:(字符)(日志 | 页面 | 附件)
经常使用:
发表于:<?php the_time('Y-h-d'); ?> 分类:<?php the_category(','); ?>
引入评论框:
http://www.cnblogs.com/tinyphp/p/6366809.html
设置和获取浏览次数: