This video shows a way to create a Settings/Options page with MetaBox or ACF and have the values live update for all viewers currently viewing a page, in near real-time.
NOTE: This uses a rudimentary Polling method. There are modern methods to push data to browsers using websockets. For very high traffic websites, that would be much better. However, for this demo I wanted to keep it simple so that anyone can do it directly from WordPress and a code manager.
You will learn:
How to create simple Settings / Options pages
How to prepare Elements for live updating
How to create a simple WordPress REST endpoint
How to use JavaScript to get the data for the REST endpoint and update the elements.
GIST: https://gist.github.com/wpeasy/869177...
Contains 2 files, Template and PHP for REST.
Смотрите видео Bricks Builder / MetaBox / ACF Live update options онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь WP Easy 28 Март 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 61 раз и оно понравилось 2 людям.