Title: Admin column
Last modified: January 15, 2025

---

# Admin column

 *  Resolved [grumo64](https://wordpress.org/support/users/grumo64/)
 * (@grumo64)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/admin-column-2/)
 * Hi Jeremy,
 * I was able to add your shortcode in admin column like that, It works but it’s
   very slow.
 * Do you have a fix or a better way to do so?
 *     ```wp-block-code
       /** * Add a Views columns to insert jetpack postviews data into */function kb_add_views_column($cols){	return array_merge(		array_slice($cols, 0, 2),		array(			'pageviews' => __('Vues <span class="dashicons dashicons-visibility"></span><style>.column-pageviews, .pageviews { width: 100px !important;text-align:center!important}</style>', 'textdomain')		),		array_slice($cols, 2)	);	return $cols;}add_filter('manage_edit-post_columns', 'kb_add_views_column');//add_filter('manage_edit-event_columns', 'kb_add_views_column');  //for cpt// Grab and display the postviews data from Jetpack for each postfunction kb_add_views_colunm_data($colname){	// Make sure we're inserting into the correct column	if ('pageviews' !== $colname)		return false;	echo '<strong>' . do_shortcode('[jp_post_view]') . '</strong>';}add_action('manage_posts_custom_column', 'kb_add_views_colunm_data');//add_action( 'manage_event_custom_column', 'kb_add_views_colunm_data' ); //for cpt/** * change the jp_post_views_cache_duration to 30 secondes */function kb_post_views_cache_duration(){	return 30;}add_filter('jp_post_views_cache_duration', 'kb_post_views_cache_duration');
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [grumo64](https://wordpress.org/support/users/grumo64/)
 * (@grumo64)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/admin-column-2/#post-18246379)
 * Soory duplicate topic

Viewing 1 replies (of 1 total)

The topic ‘Admin column’ is closed to new replies.

 * ![](https://ps.w.org/post-views-for-jetpack/assets/icon-256x256.png?rev=1518414)
 * [Post Views for Jetpack](https://wordpress.org/plugins/post-views-for-jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-views-for-jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-views-for-jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/post-views-for-jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-views-for-jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-views-for-jetpack/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [grumo64](https://wordpress.org/support/users/grumo64/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/admin-column-2/#post-18246379)
 * Status: resolved