Support » Fixing WordPress » Change edit page columns

  • Resolved coopersita



    I’m trying to change the information shown in the listing of posts for a custom post type I have:

    add_action("manage_posts_custom_column", "tips_custom_columns");
    add_filter("manage_edit-tips_columns", "tips_edit_columns");
    function tips_edit_columns($columns){
      $columns = array(
        "cb" => "<input type=\"checkbox\" />",
        "title" => "Title",
        "cat" => "Topic Category",
        "featured" => "Featured",
        "comments" => '<div class="vers"><img alt="Comments" src="/wp-admin/images/comment-grey-bubble.png" /></div>',
        "date" => "Date",
      return $columns;
    function tips_custom_columns($column){
      global $post;
      switch ($column) {
        case "featured":
          $custom = get_post_custom();
          echo $custom["featured"][0];
        case "cat":
          echo get_the_term_list($post->ID, 'Topic Categories', '', ', ','');

    I do get the columns I’m asking for (“tips_edit_columns”), but my custom columns are empty. It’s like it’s not even going over “tips_custom_columns”.

    I took the code from here (step 4): but it’s not working.

    I used this code on another site, and it worked fine, but now I just don’t see where my error is.


Viewing 1 replies (of 1 total)
  • Eureka!

    Since it’s a hierarchical custom post type, I needed to change “manage_posts_custom_column” to “manage_pages_custom_column”.

Viewing 1 replies (of 1 total)
  • The topic ‘Change edit page columns’ is closed to new replies.