wp-rest-theme icon indicating copy to clipboard operation
wp-rest-theme copied to clipboard

Creating a template for a specific page

Open nolaandy opened this issue 8 years ago • 1 comments

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!

nolaandy avatar May 02 '16 22:05 nolaandy

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.

tameroski avatar Sep 28 '16 16:09 tameroski