How can I get a post field value using javascript?
Can I use the API and a JS ajax function to get the two values? Yes, absolutely. Step 1: (PHP) Registers the custom fields (i.e. add them to the WordPress REST API response for Posts) register_meta( ‘post’, ‘address1’, [ ‘type’ => ‘string’, // string/boolean/integer/number ‘single’ => true, ‘show_in_rest’ => true, ] ); register_meta( ‘post’, ‘address2’, … Read more