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!
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"]
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?
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
Finally the solution was much simpler. Thank you so much Luo for your help!!!