0

I followed this tutorial to getting featured images to show in the admin menu on posts. I wanted to be able to see what article had a featured image and what it looked like without having to actually edit the article.

The article worked, but I noticed that it didn't work on my custom post type. So I went looking for the filter that would make it work and found manage_edit-post_type_columns

I have a custom post type for "Events". The slug for this is "events". I figured from the codex that if I did this

add_filter('manage_events_custom_columns', 'ST4_columns_content', 10, 2);

It would work but it has not. I can see the column for the featured image in the admin menu but I do not see the image in the column next to the post.

1

1 Answer 1

0

I tried both codes and they worked for me,

first I added this code

add_filter('manage_posts_columns', 'bootpress_slider_columns');  
function bootpress_slider_columns($defaults) {  
    $defaults['featured_image'] = 'Featured Image';  
    return $defaults;  
}

and it added column both in custom post type and on posts

Then I followed this link manage_${post_type}_posts_columns

my post type is "slider"

the below code worked for me

add_filter('manage_slider_posts_columns', 'bootpress_slider_columns');  
function bootpress_slider_columns($defaults) {  
    $defaults['featured_image'] = 'Featured Image';  
    return $defaults;  
}

in your case the below code should work

add_filter('manage_events_posts_columns', 'ST4_columns_content', 10, 2);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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