• Resolved Gabriel

    (@gafma)


    Hi Greg,
    I trying to show one more column at admin advert list. Using some actions, filter and properly functions I use existing adverts_email metadata to see the column.

    The action and filters are theses:

    
    add_filter('manage_advert_posts_columns', 'email_columns_head');
    add_action('manage_advert_posts_custom_column', 'email_columns_content', 10, 2);
    

    However, this not work.The email column not show in admin advert list.

    When I use:

    
    add_filter('manage_posts_columns', 'email_columns_head');
    add_action('manage_posts_custom_column', 'email_columns_content', 10, 2);
    

    I see the column email in admin post list (because I set adverts_email in post, for the test).

    Why that works to post type post but not to advert post type? This is expected that action/filter works fine to custom post type. Can you help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, in the WPAdverts i am using following functions to add columns to the Adverts list in wp-admin

    
    add_filter( 'manage_edit-advert_columns', 'adverts_edit_columns' );
    add_action( 'manage_advert_posts_custom_column', 'adverts_manage_post_columns', 10, 2 );
    

    i suppose you could use them as well, just make sure they have priority larger than 10 so your columns will not be overwritten with default WPAdverts columns.

    The functions adverts_edit_columns and adverts_manage_post_columns are in wpadverts/includes/custom-post-type.php if you would like to take a look at them.

    Thread Starter Gabriel

    (@gafma)

    Works like a charm.
    Thanks Greg.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘New column in admin advert list’ is closed to new replies.