FacetWP – include attachments on search page

mgibbs189

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

function fwp_include_attachments( $args, $class ) {
if ( $class->is_search ) {
$args[‘post_status’] = array( ‘publish’, ‘inherit’ );
}
return $args;
}
add_filter( ‘facetwp_query_args’, ‘fwp_include_attachments’, 10, 2 );
{{/gist}}