Support » Plugin: Subtitles » Disable Subtitles in search views

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Mrinal Kanti Roy


    Hi there,

    Thanks for posting this thread.

    Please have a look to this. You need to use, if ( is_search() ) to disable in search views.

    Hope this helps.


    I checked it does not work. So I wrote it here.

    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.

    I figured out, everything turned out.
    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Subtitles in search views’ is closed to new replies.