0
嘿大家,我正面臨麻煩在wordpress中調用single-{slug} .php時,我正在顯示一個特定的帖子。爲什麼single- {slug} .php不能在wordpress中調用單個帖子顯示?
例如我有一個名爲php的文章,所以我在主題目錄的二十七個文件夾中創建了一個文件single-php.php,但它沒有調用。
嘿大家,我正面臨麻煩在wordpress中調用single-{slug} .php時,我正在顯示一個特定的帖子。爲什麼single- {slug} .php不能在wordpress中調用單個帖子顯示?
例如我有一個名爲php的文章,所以我在主題目錄的二十七個文件夾中創建了一個文件single-php.php,但它沒有調用。
這裏是修正
single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.
那麼這將是對單後單後{}塞.PHP。