Working with Custom Post Types
Learn how to enable auto-generated featured images for custom post types including WooCommerce products, events, portfolios, and theme-specific post types.
Overview
WordPress Custom Post Types (CPTs) extend beyond standard posts and pages. This guide shows you how to configure Auto Featured Image to work with any custom post type.
Understanding Custom Post Types
What Are Custom Post Types?
Custom Post Types are content types beyond WordPress's default posts and pages:
Common Examples:
- WooCommerce → Products
- Events Calendar → Events
- Portfolio Plugins → Portfolio Items
- Forum Plugins → Topics, Replies
- Custom Solutions → Any registered CPT
Enabling CPT Support
Step 1: Check Available Custom Post Types
- Go to Auto Featured Image > Settings > General tab
- Look at the Generate for post types section
- View all registered post types

What You'll See:
☑ Posts (post)
☐ Pages (page)
☐ Products (product) [WooCommerce]
☐ Events (tribe_events) [The Events Calendar]
☐ Portfolio (portfolio) [Theme CPT]
☐ Testimonials (testimonial) [Theme CPT]Step 2: Enable Desired Post Types
Simply check the boxes next to the post types you want to enable:
☑ Posts
☐ Pages
☑ Products ← WooCommerce
☑ Events ← Events plugin
☑ Portfolio ← Theme featureClick Save Settings.
WooCommerce Products Setup
Special Considerations for Products
WooCommerce products have unique characteristics:
Product Image Priority:
- Product gallery (first image)
- Product featured image (if exists)
- Stock image search (product name)
- Category default image
Troubleshooting Missing CPTs
Issue: Custom Post Type Not Showing
Possible Causes:
❌ CPT not registered with thumbnail support ❌ CPT registered after plugin loads ❌ CPT is private/not public
Solutions:
Solution 1: Add Thumbnail Support Manually
Add to theme's functions.php:
add_action('init', function() {
add_post_type_support('your_cpt_name', 'thumbnail');
}, 11); // Priority 11 ensures it runs after CPT registrationReplace your_cpt_name with actual CPT slug.
Solution 2: Modify CPT Registration
If you control CPT registration:
register_post_type('portfolio', array(
'supports' => array(
'title',
'editor',
'thumbnail', // ← Add this
'excerpt'
),
// ... other args
));Solution 3: Force Enable via Filter
add_filter('afi_enabled_post_types', function($post_types) {
$post_types[] = 'your_cpt_slug';
return $post_types;
});Related Articles
- Quick Start Guide
- Settings Explained: Complete Reference
- Generating Featured Images from Post Content
- Using Stock Image Search
Need Help with Your CPT?
- Contact Support - with your CPT details
