// To be used in conjunction with the wordpress rest api plugin
//https://wordpress.org/plugins/json-rest-api/
/*Refreshed page on page update*/
<script type="text/javascript">
var date_modified = null; poll("<?php echo site_url() ?>/wp-json/wp/v2/<?php echo $post->post_type ?>s/<?php echo $post->ID ?>", 3000);
</script>
Initially this was to be used with the Rest API plugin but Rest is native now with WP so you don't need the plugin anymore.
3 Responses
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.