Change Post Visibility through Meta Box (2 posts)

  1. Gabriel
    Posted 5 years ago #

    Anyone got an idea how I can change a post to "Private" through a custom meta box?

    Yes I know I could just click on "Visibility" and change it in the Publish Box, but I am looking to see if it is possible to set the visibility automatically in my own meta box (along with other custom details).

    Any suggestions?

  2. TCBarrett
    Posted 5 years ago #


    in the myplugin_save_postdata() function you could write your own logic to set the public/private status. You would need to look in core and copy all that functionality. Don't forget all the password related bits.

Topic Closed

This topic has been closed to new replies.

About this Topic