Reputation: 81
I have a created a custom WordPress Theme.
All the Posts have a different layout and Pages have a different layout.
By default for Posts wordpress uses index.php and content.php
By default for Pages wordpress uses page.php and content-page.php
I have created two different posts.
What I want to know is how to display one post in the page template layout and the other post in post template layout?
Is this possible?
Please help.
Upvotes: 0
Views: 137
Reputation: 55
In your template you create a template called template-post.php and template-page.php
At the beginning of the file you need to use
<?php
/**
* Template Name: Page Builder
* Template Post Type: post, page
* @package WordPress
*/
Please note the Template Post Type: post, page.
Now the templates are available for both posts and pages.
Upvotes: 0
Reputation: 81
Yest this is possible by using a Plugin named - Custom post template.
Here is the link to the plugin: http://wordpress.org/plugins/custom-post-template/
Upvotes: 1
Reputation: 1
No,It is not possible to do.Different Posts is a normal post type called posts.And pages are called Page. So you can not mess up with pages and posts.Please see wordpress codex templates http://codex.wordpress.org/Templates
Upvotes: 0