Private blog post/category via hooks, wix code or ...?

Hello,

I’m trying to find a way to make a blog category private and ask to log in if the user wants to see the posts of this category.

I don’t like the “password option” from Wix and was wondering if there was any solution to my problem ?

I thought I’d check if a user is logged in on a blog post and redirect if not , but I don’t know how to add code (via Wix Code) on the blog posts…?

Maybe there is a hook we can execute before the post is visible to check the user status ?

Maybe another solution ?

I would greatly appreciate if someone had a viable solution to my problem ! :sweat_smile:

Thanks,