Site logo

Archived topic

Disable post images for a specific category only

3 replies · Started by Samuel on November 6, 2020

Viewing posts 1–4 of 4

I use Custom Post Type UI and now I have a new Custom Post Type. The category Overview displays the images in the same way as my blog archive. But I don't want any images in this new Custom Post Type. How can I deactivate it? Unfortunately there is only one general rule in the Customizer.

Hi David,

wow very powerful these filters. Thanks!

That works for me:

// /touren-Archivseite individuell gestalten
add_filter( 'option_generate_blog_settings', 'lh_custom_search_results_page_settings' );
function lh_custom_search_results_page_settings( $options ) {
    if ( is_post_type_archive( $myposttype ) ) {
	$options['post_image'] = false;
    }
  
    return $options;
}

They certainly are :)
Glad to be of help.

This archived topic is closed to new replies.