Image showing on page with metaslider even after excluding


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?


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer