Skip Navigation

[Resolved] Real Time Views

This thread is resolved. Here is a description of the problem and solution.

Problem:

Is there a way to create a real time view that shows the posts that are published in real time without refreshing the page?

Solution:

There isn't such a built-in feature within Views plugin, and it need to be done in the client's browser side, see the solution in post:
https://toolset.com/forums/topic/real-time-views/#post-920623

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by ioannisM-2 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#919301

Hello,

This ticket is for Beda or Luo. Could it be possible to create real time views for a site that will have new posts published every 1-2 minutes? Could it be possible an integration with node.js or is any other light way to achieve that with no big performance issues?

Thank you!

#919713

Hello,

First, Toolset Views plugin is for displaying data in front-end, it is not for publishing post.

So there isn't such kind of feature to publish post in every 1-2 minutes within Views plugin, or Toolset form plugin.

If you are using Views shortcode [wpv-view] to display some data of your website, you can disable Views cache feature, then it should be able to display the updated content in real time, see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view
cached (opt): off
Turns off the caching system for the View.

For example:
[wpv-view name="My amazing custom post list" cached="off"]

#920326

Thank you Luo for your answer! Yes of course a view cannot publish a post, I am sorry for the syntax error... I meant a view that is updated and shows the published posts the same time that they are published.

Is there a way to create a real time view that shows the posts that are published in real time without refreshing the page? Maybe an integration with node.js or any other solution? what would you suggest? Could you point me to the right direction how I could achieve sth like that?

#920623

There isn't such a built-in feature within Views plugin, and it need to be done in the client's browser side, so I don't think you need node.JS or something in server side.

As a workaround, you can try these:
1) Disable Views cache:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view
cached (opt): off
Turns off the caching system for the View.
For example:
[wpv-view name="My amazing custom post list" cached="off"]

2) Setup some custom JS codes to refresh the page in 1-2 minutes, for example this:
https://stackoverflow.com/questions/4644027/how-to-automatically-reload-a-page-after-a-given-period-of-inactivity

#921070

Finally the solution was much simpler. Thank you so much Luo for your help!!!