विवरण
-
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
स्क्रिनसटहरू
स्थापना
Install
- Login into your WordPress admin panel
- Navigate to Plugins => Add New
- Click Upload
- Click Choose File and select the zip file.
- Click Install Now.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Dashboard => WP Post Template and set your general setting.
- To create new custom Post Template you need to put the new file in the same directory/folder as your index.php and just need to add comment (WP Post Template: Your New Post Template Name) in your new post template file same as you do for page template.
Uninstall
- Deactivate WP Post Template in the ‘Plugins’ menu in WordPress.
- After Deactivation a ‘Delete’ link appears below the plugin name, follow the link and confirm with ‘Yes, Delete these files’.
- This will delete all the plugin files from the server as well as erasing all options the plugin has stored in the database.
प्रश्नोत्तर
- This is a forked version of dotsquares’ WP Post Template plugin. It allows theme authors to create post templates as well as page templates for their custom post types.
समीक्षाहरू
यस प्लगिनको लागि कुनै समीक्षाहरू छैनन्।
योगदानकर्ता र डेभलपरहरू
“WP Custom Post Template Redux” खुला स्रोत सफ्टवेयर हो। निम्न व्यक्तिहरूले यो प्लगिनमा योगदान गरेका छन्।
योगदानकर्ताहरू“WP Custom Post Template Redux” लाई आफ्नो भाषामा अनुवाद गर्नुहोस्
विकासमा रुचि छ?
आरएसएस द्वारा कोड ब्राउज गर्नुहोस्, एसभीएन रिपजिटरी हेर्नुहोस्, वा विकास लग को सदस्यता लिनुहोस्।
चेन्जलग
1.4.1
- Minor documentation fixes
1.4
- Added integration with Advanced Custom Fields that allows creating fields based on a post template selected
1.3.1
- Added backwards compatibility with forked plugin, if you do not explicitly specify a post type (that is active in the plugins settings) in the template the template will be available to any post type (that is active in the settings).
1.3
- Forked plugin
- added the ability to use post types in the template files
- redid the admin screen — its now under settings
- reworked some of the code
1.1 – 2015-07-18
- Updated according to new wp version functions.
1.0
- A initial version.