wordpress调文章的标题、分类、标签、作者、时间。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php wp_title(); ?></title>
</head>
<body>
<!--循环调文章标题-->
<?php
if(have_posts()):while(have_posts()):the_post();?>
<div class='posts' style='margin:20px 0;background:green;'>
<h2><a href='<?php the_permalink(); ?>'><?php the_title();?></a></h2>
<div class='cat'>所属的分类目录:<?php the_category('>>','multiple');?></div>
<div class='tag'>所属标签:<?php the_tags("<span style='background:red;'>",' 、 ','</span>');?></div>
<div class='zuozhe'>文章作者:<?php the_author();?> </div>
<div class='zuozhe'>文章作者与存档连接:<?php the_author_posts_link();?> </div>
<div class='time'>文章发表时间:<?php the_time('Y m d h:i:s');?></div>
</div>
<?php endwhile;?>
<?php endif;?>
</body>
</html>