wp-rest-theme
wp-rest-theme copied to clipboard
Creating a template for a specific page
Everything in this theme works as illustrated. Great working model! If this doesn't belong here please remove and I apologize.
I was wondering the best practice for creating a custom page template. If for instance I wanted to style a pricing page differently than my About Us page. Is this the workflow?
-Create pricing.vue -Add this to my main.js file: import Header from './pricing.vue'
Vue.component('Pricing', Pricing)
I copied page.vue into pricing.vue. Now I want to call just the Pricing page. (id:63 slug:pricing) I do this by updating the Method?
If there was any way you could include a custom page template in this repository I would be ecstatic!
I also needed this. I managed to deal with page templates with #6.
You'll need to attach templates to pages programmatically though (see at the bottom of functions.php), declare templates in main.js, and use the page.js mixin in each new page template.