mgibbs189

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

// Add to functions.php
add_action( ‘wp_head’, function() {
?>
<script>
(function($) {
$(document).on(‘facetwp-refresh’, function() {
if (! FWP.loaded) {
FWP_HTTP.user_id = ‘<?php echo get_query_var( ‘author’ ); ?>’;
}
});
})(jQuery);
</script>
<?php
}, 100 );

// Add inside your Query Arguments field:
$user_id = (int) $this->http_params[‘user_id’];
{{/gist}}