Featured image and image URL for custom post type

/* This will get you the featured image at full size */ <?php echo get_the_post_thumbnail( $customPostTypeName->ID, 'full'); ?> /* This will echo the featured image url at full size */ <?php echo get_the_post_thumbnail_url( $customPostTypeName->ID, 'full'); ?> /*It's important to note the CPT name needs added for featured images within custom post types*/

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.