How to Show Hidden Custom Fields in WordPress


Often when a plugin needs to utilize custom fields and work in the background, the authors make them hidden by adding an underscore to the name. This allows their plugin to work smoothly without any interruption. But if you are a developer trying to debug something or just a curious learner, then you probably want to know everything that is being added by the plugins. In this article, we will show you how you can display hidden custom fields in WordPress.

All you need to do is open your theme’s functions.php file and drop this code in there:

add_action( 'admin_head', 'showhiddencustomfields' );    function showhiddencustomfields() {  	echo "<style type='text/css'>#postcustom .hidden { display: table-row; }</style> ";  }

However by pasting the code, you are limited to the specific theme. If you wanted to switch the theme, then you would have to add this code all over again. So you can simply create a PHP file, and save the code in there and upload it as a plugin.

Or you can simply use Show Hidden Custom Fields

All credits for this amazing trick goes to Viper007Bond.

This post is provided by the color flyer printing experts, Next Day Flyers.