Hi, I want to suggest a change at file core/fields/relationship.php because if I choose attachment as post type, the panel doesn’t show the attachments thumbs.
At line ~ 307
// featured_image
if(in_array('featured_image', $field['result_elements'])) {
if(strtolower($post_type_object->labels->singular_name) == "media")
$image = wp_get_attachment_image(get_the_ID(), array(21, 21));
else
$image = get_the_post_thumbnail(get_the_ID(), array(21, 21));
$title .= '<div class="result-thumbnail">'.$image.'</div>';
}
And at line ~ 512
// featured_image
if(in_array('featured_image', $field['result_elements'])) {
if(strtolower($post_type_object->labels->singular_name) == "media")
$image = wp_get_attachment_image($p->ID, array(21, 21));
else
$image = get_the_post_thumbnail($p->ID, array(21, 21));
$title .= '<div class="result-thumbnail">'.$image.'</div>';
}
Bye
Hi @matteochessa
Thanks for submitting this issue.
I believe this issue is fixed on the latest version. Let me know if you are still experiencing issues with attachment as a post type.