Hello @staniole
We have edited the above code fixing it on single post and page. Please try using the above update code.
Thank you!