最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - CPT not showing template

programmeradmin1浏览0评论

I have a CPT called extended_articles, which rewrites to extended-articles. My template file for this is called content-single-extended_articles.php, and locally on my dev server this is working fine, and bringing in the template as needed.

But on the live version of the site, despite wp-admin being set up identically across both sites, it isn't bring in just the standard post template.

My post type is set up as such:

name: extended_articles
label: Extended Articles
singular_label: Extended Article
description: ""
public: true
publicly_queryable: true
show_ui: true
show_in_nav_menus: true
show_in_rest: false
rest_base: ""
rest_controller_class: ""
has_archive: false
has_archive_string: ""
exclude_from_search: false
capability_type: post
hierarchical: false
rewrite: true
rewrite_slug: ""
rewrite_withfront: true
query_var: true
query_var_slug: ""
menu_position: ""
show_in_menu: true
show_in_menu_string: ""
menu_icon: ""
custom_supports: ""

I have tried recreating the CPT and tried a completely different name in case there were caching issues or something but at this point I'm totally lost.

Can anyone suggest why this might be happening, or what can potentially be done to fix it?

发布评论

评论列表(0)

  1. 暂无评论