Created
August 11, 2014 22:42
-
-
Save dermotmcguire/1d47bd2c48a5aa6ccb86 to your computer and use it in GitHub Desktop.
Snippet: Wordpress: Show all custom fields associated with each post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show all custom fields associated with each post. | |
// From http://wpsnipp.com/index.php/functions-php/show-absolutely-custom-fields-post/ | |
add_action( 'all_admin_notices', 'wpsnipp_show_all_custom_fields' );function wpsnipp_show_all_custom_fields() { if ( isset( $_GET['post'] ) ) { $post_id = absint( $_GET['post'] ); ?> <div id="message" class="updated"> <h3>All post meta:</h3> <xmp><?php print_r( get_post_meta( $post_id ) ); ?></xmp> </div> <?php }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment