Support

Account

Home Forums Front-end Issues Load data live without refreshing page Reply To: Load data live without refreshing page

  • I don’t think you’ll find a specific tutorial that will cover everything you need, but yes, this is possible.

    Here is a quick overview of what needs to be done.

    1. You need to create JavaScript that makes use that:
      1. Makes use of timeouts to check for changes on a regular bases. You can find plenty of information on timeouts by doing a google search.
      2. Is attached to the onclick of a link or button
    2. When the timeout fires you send an AJAX request, you’ll need to send the post ID so that your server side script knows what post to get the values for. The best information on AJAX in WP can be found here: https://codex.wordpress.org/AJAX_in_Plugins
    3. You’re server side script then gets the values from the ACF fields and sends them back. I would send them as a JSON object
    4. You’re AJAX Callback function parses the returned value and updates the content on the page.