• Resolved crazybainy

    (@crazybainy)


    Hi,

    I have been using the following code to only show the default featured image on the excerpt and not in the post itself, but I am also using the featured image on pages and wondered what I should add to this code or perhaps some different code to not show the default featured images on pages too?

    ‘function exclude_single_posts ( $dfi_id, $post_id ) {
    // don’t trigger on individual posts
    if( is_single() ) {
    return 0; // invalid id means no image
    }
    return $dfi_id; // the original featured image id
    }
    add_filter( ‘dfi_thumbnail_id’, ‘exclude_single_posts’, 10, 2 );’

    https://www.ads-software.com/plugins/default-featured-image/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured Image on Pages’ is closed to new replies.