Output an attachment thumbnail

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// Add the following into the custom-hooks.php file

add_filter( ‘facetwp_builder_item_value’, function( $value, $item ) {
global $post;

if ( ‘attachment’ == $item[‘settings’][‘name’] ) {
$value = wp_get_attachment_image( $post->ID );
}
return $value;
}, 10, 2 );
{{/gist}}