跳到内容

WP Custom Post Template Redux

v1.4.3

Mat Gargano · 2016年7月9日 上架

This plugin lets you add the custom post templates in your Wordpress custom post type. You can easily apply your custom post template in custom post t …

正在使用
10+
评分
暂无
累计下载
2,910
最近更新
2016年7月11日
需要 WordPress 3.0+已测试到 4.5.33

贡献者

截图

Screenshot of dropdown for selecting a custom post type template
Screenshot of dropdown for selecting a custom post type template
Screenshot of the enable post type select screen
Screenshot of the enable post type select screen
Screenshot of a template that is a page template and a custom post type template for two different custom post types
Screenshot of a template that is a page template and a custom post type template for two different custom post types
Screenshot demonstrating how to use a Custom Post Type Template with Advanced Custom Fields
Screenshot demonstrating how to use a Custom Post Type Template with Advanced Custom Fields
  • This plugin lets you add the custom post templates in your WordPress custom post type. You can easily apply your custom post template in custom post type posts, just as you would do the same for page templates.

  • The templates are defined similarly to page templates, and if selected will replace single-cpt-slug.php (see template hierarchy https://developer.wordpress.org/themes/basics/template-hierarchy/) for the specified post.

  • Admin can use default setting for the custom post type plugin by simply clicking on default setting button.

Implementation notes:

  • Page templates use, in the comments at the top of the file “Template Name:”, whereas to use this plugin’s custom post templates use “WP Post Template: my-post-type-slug” — you can combine page templates and custom post type templates by just adding the applicable comments to the PHP file.

  • CPT templates use “WP Post Type:” plus the custom post type slug, e.g. “WP Post Type: my-fun-post-type” you can use a single template for multiple post types – if you leave it blank it will be available to all post types, which will maintain compatibility with WP Custom Post Template 1.0.

  • You must have store the custom post template files in your theme in the same directory/folder as your index.php template file, not in a sub-directory/sub-folder.

Features

  • Select custom post type where you need to show the post template.

  • Select default setting to show post template in your theme default post type.

  • You can add Advanced Custom Fields field groups based on the Custom Post Template chosen

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums