Open ghost opened 4 years ago
I'd highly recommend buying this course. It covers all the nitty gritties and is easy to follow. Also, doesn't cost much (always some offer going on). There are some free courses as well in there that I haven't looked into.
I'd highly recommend buying this course. It covers all the nitty gritties and is easy to follow. Also, doesn't cost much (always some offer going on). There are some free courses as well in there that I haven't looked into.
Yep I'll probably do that after finishing 'Up and running with Vue' from O'Reilley, but at the moment my main concern and focus is to understand the in-betweens of wordpress and vue with this RADL instance.
I've created a new endpoint in functions.php for categories with some certain ID, but that doesn't seem to be enaugh to pull it into my Vue.
I'd highly recommend buying this course. It covers all the nitty gritties and is easy to follow. Also, doesn't cost much (always some offer going on). There are some free courses as well in there that I haven't looked into.
Yep I'll probably do that after finishing 'Up and running with Vue' from O'Reilley, but at the moment my main concern and focus is to understand the in-betweens of wordpress and vue with this RADL instance.
I've created a new endpoint in functions.php for categories with some certain ID, but that doesn't seem to be enaugh to pull it into my Vue.
Following up with this. I've managed to insert the data into the store so I can use it with all components. However, did not managed to succeed with a new endpoint; I receive the "code": "rest_no_route", "No route was found matching the URL and request method", when I try to access a custom route.
Steps:
'retreats' => RADL::callback('retreats'),
-> instantiated the __VUE_WORDPRESS__ store with a new structure of mixed valuesfunction retreats(){
$retreats = [];
$args = array(
'post_type' => 'post',
'category_name' => 'retreats'
);
$the_query = get_posts($args);
foreach ($the_query as $key => $post){
$retreats[$key] = $post;
$retreats[$key]->acf = get_fields($post->ID);
}
return $retreats;
}
to quick-view the data in a raw format I'm using this.$store.state.retreats
. I'll follow up with actions, mutations and getters for those, hopefully :)
Hi. I will intensely work with this for the next few weeks (or at least, this is what I highly hope to do if my manager allows the project to continue).
I am a beginner in Vue, like, really nub. I know the basics, I understand the MVC model, the directives and stuff like that. My issue:
Is anybody here available for a couple of hours of chit chat on this subject? I'm seeking for help to understand the following:
How does the Vue receive the data from WordPress - How can I alter this, and how can I add post types and meta fields (from acf, for example) to my Vue?
How can I make components behave based on an external state, or ones state (actually I have a pretty good idea about this but haven't done it yet so I'll just lay it off here)?
How can I make it valid and make sure I don't write shitty code?
There are surely more How to's but I haven't hit them yet.
Even if no response is given to this issue, I am willing to discover those and log them here; for new people that might be using this and find their selves in this situation.
Hopefully it's approved for display, Kind regards.