• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add Featured Image To Single Custom Post Type Pages

This tutorial provides one method which enables you to display your featured image on single CPT’s in any Genesis child theme.

All you need to do is create a new file in your themes root directory using these instructions and PHP code.

  1. Simply create a new file using a code editor like Notepad++
  2. Copy the PHP code from the view raw link in the Gist labelled single-portfolio.php
  3. Name the file single-cpt-name.php, replacing cpt-name with the name of your custom post type.
  4. Upload the file to your child themes root directory.

This post answers this forum question:

I’ve created a custom post type for my site (I’m using the Agent Press Pro theme) and I’d like to have the featured image attached generate an automatic image insert on my single portfolio pages, much the way LISTINGS does within this theme.

Related Tutorials

  • Set Default Featured Image for Custom Post Type in Genesis

Custom Post Type

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems