Managing columns
-
Hi there!
I am working on a WordPress plugin and i have a problem with outputting some data. I want to create a custom column. Right now i have the following code:
add_filter('manage_nwsbrf_posts_columns', 'set_custom_category_nwsbrf_columns'); add_action('manage_nwsbrf_posts_custom_column', 'custom_category_nwsbrf_column', 10, 2); function set_custom_category_nwsbrf_columns($columns) { return $columns + array('categories' => __('Categorie')); } function custom_category_nwsbrf_column($column, $post_id) { switch ($column) { case 'categories': echo "test"; break; } }This code displays only the name of the column, which is Categorie. But no data is outputted in that column. It should output test. Can someone tell me what i’m doing wrong?
The topic ‘Managing columns’ is closed to new replies.