Search doesn't return CPTs when Polylang is activated


When Polylang, a free multilanguage plugin, is active on this site, the search functionality ceases to return results from the custom post type of ‘usp_post’. This is a post type generated by the premium plugin USP Pro, which allows non-subscribed visitors to the site to submit posts.

I have proven to my satisfaction that Polylang is the issue here, because all I need to do is deactivate it in order for the search results to include CPTs again.

I have done quite a bit of Googling about this issue. One solution I tried was to add a function that is supposed to include all custom post types in searches. This works when Polylang is inactive but did not work when Polylang was active:

function tgm_io_cpt_search( $query ) {

if ( $query->is_search ) {
$query->set( 'post_type', array( 'post', 'page', 'usp_post') );

return $query;


I also installed the Relevanssi plugin, which in the past has always worked for me. Again, CPTs are not returned when Polylang is active but show up when it is deactivated.

Finally, I’ve tried creating my own customized version of search.php and searchform.php, since apparently the way these are set up can affect returns, but these had no effect or else broke search completely.

This is a beta site, so I am not too concerned about damage being done. All pages are currently protected by a password except for:

I have granted access to this site’s admin side through the support panel. Feel free to activate and deactivate Polylang as needed.