Support › MB Blocks › How to get render_callback() have a dynamic output?Resolved
When using MB Blocks, with a render_callback() what I noticed is that the output will be static and reflect what was there when the post was saved.
Is there any way to make the render_callback() render on the frontend? and not stick to the state when it was last saved on the post?
Here is how to see the issue:
Create an MB Block that will output time().
Add it to a post and save it.
Check the post on the frontend. And refresh a couple of times. You will see the same timestamp showing there.
Is there any turnaround to make it so the output is dynamic? In the above case, show the current timestamp on each refresh.
I use the time() function in the code block but do not save the time to the post content (a field value), the current timestamp displays correctly. Here is the screen record
Can you please share some screenshots of block settings on your site?
The out is working as expected.
Thanks for checking. Your confirmation helped me recall where the root cause of the issue I was experiencing was 🙏
It was a mistake on my end. I was pre-processing the output and caching it 😅 and I totally forgot about that 😜