Created
April 16, 2020 15:28
-
-
Save mgibbs189/e122f10e39f4166f7ca40a538bf3ef6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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