I have the following situation:
Now my question. Is it possible to load all the data from advanced custom fields live when i change someting… without reloading the site? You dont need to tell me everyting i know its complex but just if there is any tutorial or something.
Thx for your help and best regards.
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.
- 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.
- Is attached to the onclick of a link or button
- 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
- 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
- You’re AJAX Callback function parses the returned value and updates the content on the page.
Thank you so much for your help! That gives me an idea how to solve that problem.