WordPress Vue Js Shortcodes

After a while i got it : In the functions.php i added the line : wp_localize_script(‘vue_wordpress.js’,’sharedData’,array( ‘contactForm’ => do_shortcode(‘[contact-form-7 id=”5″ title=”Formulário de contacto 1″]’) ) to the already existing function i had: function vue_wordpress_scripts() { // Styles wp_enqueue_style( ‘style.css’, get_template_directory_uri() . ‘/style.css’ ); // wp_enqueue_style(‘vue_wordpress.css’, get_template_directory_uri() . ‘/dist/vue-wordpress.css’); // wp_enqueue_style(‘global’,get_template_directory() . ‘/styles/menu.css’ ); //copiar este … Read more

Expose a custom field of a custom post type to the REST API

Modify your code as below: /********************************************** * Add featured video to REST API ***********************************************/ function add_featured_video_id() { register_rest_field( array(‘post’, ‘project’), ‘featured_video_id’, array( ‘get_callback’ => ‘get_featured_video_id’, ‘update_callback’ => null, ‘schema’ => null, ) ); } Visit here, for more details on method register_rest_field,

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)