F
F
FullStack Alex2017-08-18 18:14:15
WordPress
FullStack Alex, 2017-08-18 18:14:15

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

4 answer(s)
A
Alexander, 2017-08-19
@boratsagdiev

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.

W
WordPress WooCommerce, 2017-08-18
@maxxannik

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.

R
Ramil, 2017-08-18
@rshaibakov

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 question

Ask a Question

731 491 924 answers to any question