Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ngow

    (@ngow)

    All sorted thanks for your assistance.

    Correct syntax and naming, so can now set and update the post geo location data via the rest api. Javascript example below:

    
    		var post_data = {
    			id:o_post.id,
    			title:"Title",
    			content:"Content of the post",
    			categories:"1,2",
    			tags:"5,6,7",
    			meta:{
    				geo_latitude:"51.4411688",
    				geo_longitude:"-0.2746582",
    				geo_address:"Park",
    				geo_public:"1",
    			},
    			status:"publish",
    		};
    var body_data = JSON.stringify(post_data);
    
    Thread Starter ngow

    (@ngow)

    Thanks for the response, I was using a plugin SimpleLocation, this had the register_meta() calls, but had set the ‘show_in_rest’ to false, so very easy to change to true.

    Hoping the meta value and names to use is easy to sort out.

Viewing 2 replies - 1 through 2 (of 2 total)