Home » Ask (Forum) » Display Post ID in Wp Admin Post or Page Column

Question

Hello, in this WordPress tutorial I will show to you How to find and Display Post ID in Wp Admin Post or Page Column in your Wp site.

/* display post ids in wp-admin all posts */
function bikinwebsite_add_id_column( $columns ) {
$columns['revealid_id'] = 'ID';
	return $columns;
}
add_filter( 'manage_posts_columns', 'bikinwebsite_add_id_column', 5 );

function bikinwebsite_id_column_content( $column, $id ) {
	if( 'revealid_id' == $column ) {
	echo $id;
	}
}
add_action( 'manage_posts_custom_column', 'bikinwebsite_id_column_content', 5, 2 );

Good luck 🙂

Jul 18, 2016 (5 months ago) - Posted by No Comments

Your Answer

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