I'm trying to add a Featured Image to my theme but not for Posts or Pages - I've created a custom type called Properties (its for an estate agent), so how do I enable Featured Image, as it doesn't appear in the sceen options?
Hope someone can help,
$property = new Cuztom_Post_Type( 'Property', array(
'supports' => array('title', 'editor')
));
Configure WordPress Dashboard SettingsNavigate to your WordPress dashboard and click on Screen Options. Check the Featured image option to display a featured image column in your post and page lists. The Featured image tab should now appear in your content editor.
If you run any type of site that publishes new content regularly, it's vital to add a featured image to each one. Plus, since these images will do a lot to determine your site's visual style (and even its performance), it pays to spend some time choosing and preparing them carefully.
Select a post for which you'd like to hide the featured image. Under the Post tab (to the right) find the Featured Image section. With the plugin now installed, you'll see an option to “Display featured image in post lists only, hide on singular views.” Mark that checkbox to activate the feature.
Adding a Post Thumbnail or Featured Image to WordPress To add a featured image to a WordPress post, simply edit or create a new blog post. The featured image tab is located in the content editor's right column. The WordPress media uploader popup will appear when you click on the 'Set Featured Image' area.
This might help someone,
add_theme_support('post-thumbnails');
add_post_type_support( 'my_product', 'thumbnail' );
function create_post_type() {
register_post_type( 'my_product',
array(
'labels' => array(
'name' => __( 'Products' ),
'singular_name' => __( 'Product' )
),
'public' => true,
'has_archive' => true
)
);
}
add_action( 'init', 'create_post_type' );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With