1

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 1

0

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.

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.