0

I'm using Custom Post Types UI and Advanced Custom Fields Pro to create a 'Portfolio Images' post type. The custom fields include Image as well as some others. When clicking on 'All Portfolio Images' in the admin, is it possible to show a list of thumbnail images instead of the post titles?

1 Answer 1

0

I would look into adding a custom post column for that post type which shows the image you'd like to.

See this link.

edit: here's a working example.

function add_column_header_298736( $defaults ) {
    $defaults[ 'image' ] = 'Image';

    return $defaults;
}
add_filter( 'manage_results_posts_columns', 'add_column_header_298736', 20 );

function add_column_content_298736( $column_name, $post_id ) {

    if ( $column_name == 'image' ) {
        // do stuff to retrieve your image
    }
}
add_action( 'manage_{your_post_type}_posts_custom_column', 'add_column_content_298736', 20, 2 );
2
  • Yes, that's it, but it might help OP if you elaborate a bit instead of just dumping a link.
    – cjbj
    Mar 23, 2018 at 17:58
  • Fair enough... *edit code doesn't work in here, will edit initial reply.
    – Beee
    Mar 23, 2018 at 22:26

Your Answer

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

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