• I use the Essential Content Types plugin with the Seriously Simple Podcasting plugin that creates a customer post type called “podcast”. However, on visiting archive pages for these custom post types I get the following error:

    Notice: Undefined index: podcast in <my-site-root>/wp-content/plugins/essential-content-types/essential-content-types.php on line 275
    Notice: Undefined index: in <my-site-root>/wp-content/plugins/essential-content-types/essential-content-types.php on line 239

    I looked at the plugin code and ECT plugin will fail if any customer post-type is used which is not recognized by your plugin (i.e. anything else than “Services”, “Testimonial”, “Portfolio” or “Featured Content”). Please correct this so that if the user created any other customer post type manually or via other plugins then ECT doesn’t clash with it.

    $default_title = array(
    		'ect_service_title'         => esc_html( 'Services', 'essential-content-types' ),
    		'jetpack_testimonial_title' => esc_html( 'Testimonial', 'essential-content-types' ),
    		'jetpack_portfolio_title'   => esc_html( 'Portfolio', 'essential-content-types' ),
    		'featured_content_title'    => esc_html( 'Featured Content', 'essential-content-types' ),
    	);
    
    	$archive_title = get_option( $type, $default_title[ $type ] );

    Thanks,

    Debashish

Viewing 1 replies (of 1 total)
  • Thread Starter Debashish

    (@debashish)

    The solution will be to handle null like as follows:
    return $type[ $post_type ] ?? null;

Viewing 1 replies (of 1 total)
  • The topic ‘Clash with custom post types’ is closed to new replies.