0
我製作了一個名爲product
的自定義帖子類型。 現在我的目標是爲我要添加的所有產品使用模板文件。WordPress Sage自定義帖子類型模板
我使用Sage開發我的主題。
到目前爲止,我在主題的根目錄創建了一個名爲single-product.php
文件看起來像這樣:
<?php get_template_part('templates/product-single', get_post_type()); ?>
我templates/product-single
看起來是這樣的:
<?php while (have_posts()) : the_post(); ?>
<h1>hey</h1>
<?php endwhile; ?>
所以理論上我應該看到hey
當我去一個產品頁面。我在做什麼錯在這裏
Not Found Sorry,
but the page you were trying to view does not exist.
任何人都知道:不幸的是我得到這個錯誤?