Expert Group of programming

How to Add/Remove screen options

Posted by : Heycode Tech | Posted in : admin customization, wordpress, WordPress Functions | Sep 17,2015 | 0 comments

This is the admin feature for showing the listing in a column. Here we can see this column and understand about the post information . Sometimes, we need to hide and sometime we need to remove this options from admin. Here is both descriptions of this option.


How to hide and Show the screen options :

For hide this options, we need to un-check this options and it will hide from post listing. But don’t worry, if you need to apply these options just check it and it will available at previous.

Remove the screen options


For removing the screen options, you need to use the filter : manage_edit-post_columns :

 * Remove the seo column and other in post menu for the user : contributor and author 
 function heycodetech_remove_columns( $columns ) {
  	// remove the All in one SEO columns
	unset( $columns['seotitle'] );
	unset( $columns['seodesc'] );
	unset( $columns['seokeywords'] );
	unset( $columns['comments'] );

	return $columns;

add_filter ( 'manage_edit-post_columns', 'heycodetech_remove_columns' );

Here is the example code for removing the screen options. But before using it you need to print print_r($columns); Then you can seen all the available columns and as per you request,you can remove it from admin dashboard.


Author information - Heycode Tech

Every world can ask question and my website registered user give the suggestion.

See all posts by Author

Connect to author

About us

Heycodetech is a platform where you can ask any questions related to the programming like PHP,jQuery, MYSQL,HTML , CSS and moreHere is the Expert group of programming.