• Resolved Farbweiss

    (@farbweiss)


    Hello,
    thank you very much for the update of the plugin – and compatibility with WP 6.2.
    Just one question – we just want default images only for postings, not for other cpt. So we use the Snippet below in our theme’s function.php:

    /**
     * Fallback Featured Image only for postings
     */
    function theme_slug_default_featured_image( $dfi_thumbnail_id, $post_id )
    {
    	$post = get_post( $post_id );
    
    	// Show default featured image only on blog posts
    	if ( 'post' === $post->post_type ) {
    		return $dfi_thumbnail_id;
    	}
    
    	// Return invalid Image ID
    	return 0;
    }
    

    Will this code still work with the latest version 1.7.3 or do we have to change the snippet? If so – could you please tell me, what to change?

    Thanks in advance and have a great day!
    Manuel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jan-Willem

    (@janwoostendorp)

    Hello Manuel,

    Yes the snippet will still work.
    So many people use these snippets, I’ll never break them.
    I consider them as vital for use as it’s main feature.

    Jan-Willem

    Thread Starter Farbweiss

    (@farbweiss)

    Hi Jan-Willem,
    Bedankt voor het snelle antwoord. Ga zo door! ??

    Have a great day
    Manuel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Snippet for’ is closed to new replies.