Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this compatible with Carbon fields? #49

Closed
joannesalfa opened this issue Feb 10, 2019 · 1 comment
Closed

Is this compatible with Carbon fields? #49

joannesalfa opened this issue Feb 10, 2019 · 1 comment

Comments

@joannesalfa
Copy link

https://carbonfields.net

It's awesome library you can easily add custom fields as gallery, nested list, widget, gutenberg block, etc.
Basically you add something in function.php then pass a variable into any wordpress page template.... but how do you store php variables into vue.js data?

In that case it's a php code carbon_get_theme_option( 'crb_myName_field' );

@EvanAgee
Copy link
Owner

@joannesalfa you would accomplish this by updating the WordPress REST API to include that data here's a guide on how to do so [https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/]. There are also a number of WordPress plugins that allow you to control the API output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants