help getting featured image from custom post type
-
I have used one version of code to get the image from the featured image, but I need the image place in a specific spot so I am looking to call the image outside of the_content(). My code right now returns the ID number, I don’t know why. In my searching, I have found others with this issue, but their fix did not work for me.
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'OurMenu', array( 'labels' => array( 'name' => __( 'Menu' ), 'singular_name' => __( 'Menu' ) ), 'capability_type' => 'post', 'public' => true, 'supports' => array( 'title', 'editor', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'thumbnail', 'author', 'page-attributes', ) ) ); }
I also have this line in my functions.php but I don’t believe it is needed
add_theme_support( 'post-thumbnails', array( 'post','OurMenu' ) );
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘help getting featured image from custom post type’ is closed to new replies.