WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove visibility option from publish box? (2 posts)

  1. nitrammit
    Member
    Posted 1 year ago #

    Hey.

    I'm looking for a way to remove the visibility option (public, password protected or private) altogether from my page/post editor's publish box.

    Any ideas?

  2. nitrammit
    Member
    Posted 1 year ago #

    Figured out a solution:

    Add this to your theme's functions.php file:

    add_action( 'admin_head', 'showhiddencustomfields' );
    
    function showhiddencustomfields() {
        echo "<link rel='stylesheet' media='screen,projection' type='text/css' href='" . get_template_directory_uri() . "/css/dashboard.css'>";
    }

    Create a new file named dashboard.css inside your theme directory's CSS folder and drop in the following:

    #misc-publishing-actions #visibility {
    	display: none;
    }

    Easy!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags