Good question!
I think your best approach would be to set up a component, and pass the the_title(); etc. in as a prop (variable).
See: vuejs.org/v2/guide/components.html This will guide you through making a component.
Passing props (variables into your components): vuejs.org/v2/guide/components.html...
In the end, you'd end up with something like.. in vuecode.js
Vue.component('wp-vue-title', { props: ['title'], template: '<h3>{{ title }}</h3>' })
In your template:
<wp-vue-title title="<?php the_title(); ?> "></wp-vue-title>
Note: In the example tutorial, it adds a shortcode.
In your case, you probably wouldn't need it, since it sounds like you're doing this through the template. Shortcodes work better on the text side.
Good luck!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good question!
I think your best approach would be to set up a component, and pass the the_title(); etc. in as a prop (variable).
See: vuejs.org/v2/guide/components.html
This will guide you through making a component.
Passing props (variables into your components):
vuejs.org/v2/guide/components.html...
In the end, you'd end up with something like..
in vuecode.js
In your template:
Note: In the example tutorial, it adds a shortcode.
In your case, you probably wouldn't need it, since it sounds like you're doing this through the template. Shortcodes work better on the text side.
Good luck!