2.5.4 提问:⾃定义⽂章类型如何与WordPress主题集成?
⾃定义⽂章类型与WordPress主题集成要将⾃定义⽂章类型与WordPress主题集成,需要按照以下步骤进⾏操作:
1. 在主题的functions.php⽂件中注册⾃定义⽂章类型}
2. 创建⾃定义模板⽂件在主题中创建single-custom_product.php和archive-custom_product.php等⾃定义模板⽂件来展⽰⾃定义⽂章类型。
3. 使⽤WordPress Loop在主题⽂件中使⽤WordPress Loop来显⽰⾃定义⽂章类型的内容。⽰例使⽤⾃定义⽂章类型Products:$args = [$products = new fa_Query($args);if ($products->have_posts()) {while($products->have_posts()) {$products->the_post();} }
10 Screens$8,029
I will design rough sketches for upto 5 Screens of your website/Mobile app.
3 Days
Delivery
1
Revision
- Source File
- Commercial Use
- Interactive Mockup
- 10 Pages
20 Screens$16,029
I will design rough sketches for upto 5 Screens of your website/Mobile app.
- Source File
- Commercial Use
- Interactive Mockup
- 10 Pages
30 Screens$24,029
I will design rough sketches for upto 5 Screens of your website/Mobile app.
- Source File
- Commercial Use
- Interactive Mockup
- 10 Pages