I want to have a code/clue to add "wp post visibility" option for front-end. I will use radio buttons get a value from user. e.g. if user selects "No" the post will become private else if user chooses "Yes" it will be public.
1 Answer
One option is to use Ajax. I wrote this tutorial on how to use Ajax with WordPress and if you follow those steps, you'll get the general idea. Of course, you'll have to write some HTML to display the radio buttons, and then in your Ajax Callback function, you'll want to change the post status to private or publish depending on the user's response.
-
Thank you Linnea, but I have some basic knowledge with wordpress, can you please help or guide me to achieve my task? Commented Jan 29, 2016 at 7:30