WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to add a custom column to the tables shown on the Tags & Categories admin pages in Wordpress.

I have created a function, and added it as a filter using

add_filter( 'manage_post_tag_custom_column' , 'my_custom_column' , 10 , 2 );

My function is

my_custom_column( $out , $name , $term_id ){
  switch( $name ){
    case 'my_column_slug' :
      echo '<pre>';var_dump( func_get_args() );echo '</pre>';

My column is shown in the table, with the <pre>...</pre> content, but it seems that no $term_id is being passed to my function.

array(2) {
  string(0) ""
  string(12) "my_column_slug"

I have referred to a number of resources to confirm that there should be three arguments passed to the function (including this StackExchange article). Am I missing something here?

share|improve this question
up vote 4 down vote accepted

You are using wrong number of arguments in add_filter, you specified to get 2 arguments and you are looking for third one:

Update your add_filter code to this:

add_filter( 'manage_post_tag_custom_column' , 'my_custom_column' , 10 , 3 );

The 3 in the end tells the filter to provide all the three arguments to your function.

share|improve this answer
You sir, are a genius. Thank you! – Lucanos Mar 22 '14 at 6:49
Na not genius just checked it properly ;) – sven Mar 22 '14 at 10:59
Please - take the "genius" compliment. Makes me feel like less of a goose for making such a silly and simple mistake. – Lucanos Mar 23 '14 at 3:34
Happens all the time :), nothing so big..! – sven Mar 23 '14 at 7:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.