As I understand, you mean this code:
/**
* Disable Subtitles in archive views.
*
* @see function is_archive
* @see function in_the_loop
*/
function subtitles_mod_supported_views() {
// Ditch subtitles in archives.
if ( is_archive() ) {
return false;
}
// Default in The Loop behavior from Subtitles.
if ( in_the_loop() ) {
return true;
}
} // end function subtitles_mod_supported_views
add_filter( ‘subtitle_view_supported’, ‘subtitles_mod_supported_views’ );
This code works fine for me for archives views.
I tried to add a similar full code, only replacing “if ( is_archive() )” with “if ( is_search() )”.
But in this case, I lose access to the site, and I was forced to delete this code.
Tell me how to do it correctly.
Thank you.