3.文章内容(详情)加载顺序(Blog Post) 顺序如下: single-{post-type}-{slug}.php single-{post-type}.php single.php singular.php 1、embed-{post-type}-{post_format}.php 2、embed-{post-type}.php 3、embed.php ① embed-{post-type}-{post_format ② embed-{post-type}.php–如果帖子类型为product,WordPress将寻找embed-product.php。
主页 front-page.php——静态首页 home.php——动态首页 index.php——默认模板 文章单页 single-{post-type} – {slug} .php——用于显示任意类型的单个特定文章 embed- {post-type} – {post_format} .php——WordPress将首先查找帖子类型和帖子格式模板。 embed- {post-type} .php——如果帖子类型是review,WordPress会寻找embed-review.php。 embed.php——所有嵌入的默认回退。
post_id,'my_book_url',$my_book_url); } } 设置文章类型内容模板 设置文章内容模板就简单多了,只需要在主题目录新键文件 single-{post-type