• Resolved elainewildash

    (@elainewildash)


    Hi,

    On a site where we’ve setup the Default Featured Image plugin. Its working fine except where the front page uses Metaslider. Even after excluding the page using the code below in the functions file:

    add_filter( 'dfi_thumbnail_id', 'dfi_skip_page', 10, 2 );
    function dfi_skip_page( $dfi_id, $post_id ) {
        if ( $post_id == 23 ) {
            return 0; // invalid id.
        }
    
        return $dfi_id; // the original featured image id.
    }

    Page id is 9 and code changed to $post_id == 9. It still shows the image and seems to stutter before the slideshow begins.

    Is there anything else that needs to be done?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter elainewildash

    (@elainewildash)

    Managed to resolve it. For some reason Metaslider was adding in the default image multiple times even though it wasn’t part of/added to the slideshow.

    Setup a new slideshow, and its working correctly now.

    Plugin Author Jan-Willem

    (@janwoostendorp)

    Hi Elaine,

    Good to hear you’ve managed to solve it!
    I’m not familiar with metaslider, but sometimes these slides can be there own custom post type.
    And you might want to exclude or make exceptions for those.

    But if you need any help just let me know,

    Best,
    Jan-Willem

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image showing on page with metaslider even after excluding’ is closed to new replies.