EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 281 forks source link

Create a wordpress theme with VueJS incorporated #30

Closed DavNej closed 5 years ago

DavNej commented 6 years ago

Hi, I am building a custom theme in wordpress php and I would like to incorporate some vue components in it. I would like to keep wordpress' functionnality (login, register, custom post-types etc.) and its core php functions.

Is it possible to use Vue in some sections of some pages only, including the scripts in a php file and make vue run it instead of index.html (default in vue-cli) for example?

Thanks a lot :)

adovgun commented 6 years ago

Hi DavNej. I am WordPress developer with more years practice, and now have project WP+VUE.js My === full BackOffice and control project, frontend developer === Front (logic : )

I fell in love with VUE :) Before I had project WP+AngularJs - and I did not feel like as with VUE

I think you need try combine WP and VUE.js as single page application, but you waiting ONE BIG problem... Problem with search machines not index part with VUE.

Near in future time me need will done this point and after this, I will using vue in all my wp projects...

EvanAgee commented 5 years ago

@DavNej YES! This is actually what most devs are doing, I would say. You can create Vuejs components/apps that can easily be injected into a page. Typically these are done as plugins but you could also just make it part of the theme. Here's a great tutorial on setting one up https://deliciousbrains.com/vue-2-wordpress-plugin-tutorial/