I create a CPT and make a custom field (slug: ad_status, type: radio with values: 1 and 2). I want the post to become private when the field value equals 2.
I try to use following shortcodes in the Views, but it fails.
[wpv-conditional if="( $(wpcf-ad_status) eq '2' )"][wpv-post-status show="private"][/wpv-conditional]
When you say " I want the post to become private when the field value equals 2" you mean you want to use WordPress's private post status, yes, rather than use Access for example to hide content?
If that's the case then it seems like you need to update the post status when the post is saved, depending on the value of the custom field.
And to do that, it depends on whether you are saving the post in the backend or using a frontend form?