How to Show Hidden Custom Fields in WordPress

By | September 12, 2014
0
0



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 “

“;
}

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.

Leave a Reply

Your email address will not be published. Required fields are marked *