在模板中包含指定的模板文件,指定{slug}和{name}就可以包含文件{slug}-{name}.php,如果没有这个文件则包含{slug}.php文件 尝试下:如果我要把主题下的diy.php引入到首页应该怎么写呢? 更多查看官方 API : get_template_part Read More
posted @ 2015-04-08 15:18
tinyphp
Views(543)
Comments(0)
Diggs(0)
在wordpress中,模板标签指一些字段,比如标题,内容,作者,发布日期,评论数等等,获取静态值和循环里面经常使用。输出模板标签一般有两种方式:the_yourtag() 输出标签值和get_the_yourtag()获标签值通常来说,the_yourtag()==echo get_the_you... Read More
posted @ 2015-04-08 10:26
tinyphp
Views(526)
Comments(0)
Diggs(0)
wordpress循环分两种,一种是自定义循环,一种是默认循环。自定义循环:根据指定参数进行实例化调用所有页面,post_type值:page对应页面,post对应文章'page' );$the_query = new WP_Query( $args );// The Loopif ( $the_q... Read More
posted @ 2015-04-08 09:44
tinyphp
Views(472)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号