Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created April 16, 2020 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/e122f10e39f4166f7ca40a538bf3ef6d to your computer and use it in GitHub Desktop.
Save mgibbs189/e122f10e39f4166f7ca40a538bf3ef6d to your computer and use it in GitHub Desktop.
<?php
// Insert the following code into your (child) theme's functions.php
add_filter( 'facetwp_builder_item_value', function( $value, $item ) {
if ( 'personal-photo' == $item['settings']['name'] && !empty( $value ) ) {
$value = wp_get_attachment_image( $value, 'full' ); // 'full' can be changed to other image sizes
}
return $value;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment