Answer the question
In order to leave comments, you need to log in
Vue.js + Wordpress?
Does anyone have experience? Is it possible to take advantage of one platform without overpowering the other?
I have solid experience with Wordpress but no practical experience with Vue.js and MVC-Frameworks in general.
The other day I put together a small site for a client in vue.js, but after npm run build I realized that some special approach was needed)) I had to spend the night redoing everything back to the php structure in Wordpress. That is, I removed vue.js completely.
Along the way, all Wordpress templates (header, category, footer, etc.) must emit json object through wp rest api?
Answer the question
In order to leave comments, you need to log in
You don't need Wordpress templates to combine these two things. As I see the development with these two:
- WP gives the necessary data to the rest API (it can do this by default, it seems that you just need to install a plugin to enable it). This is your backend.
- On VueJS, you write the entire frontend - that is, the entire layout of the template is in vue files, as well as all the logic for getting posts, categories, comments, and other things from the WP backend.
Can. But I think it's worth reading the discussion of colleagues on this topic oddstyle.ru/wordpress-2/novosti-wordpress/itogi-di...
I personally don't consider Vue. And everyone who is more or less adequate in this topic, in my opinion, chooses React. All that is worthy of attention.
Vue or Angular is a fringe choice. Well, PCHM is very popular in the Russian Federation.
You are trying to combine the incompatible. Why would you use CMS as your REST API? This is perversion!
If you need a backend, take any language you know (PHP, Python, NodeJS, etc.) and write a REST API in it. Fortunately, each language has a framework where you can easily develop your own API.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question