0

I've created a custom post type.

add_action( 'init', 'my_custom_post_type' );
function my_custom_post_type() {
  register_post_type( 'my_custom_post_type',
    array(
      'labels' => array(
        'name' => __( 'custom Posts' ),
        'singular_name' => __( 'custom Post' )
      ),
        'public' => true,
        'has_archive' => true,
        'capability_type' => array("custom Post", "custom Posts"),
        'map_meta_cap' => true,
        'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments' )
    )
  );
}

If I add any images on the editor it displays as it is on the front end. but If add any gallery it displays as some thing like this: [gallery link="file" ids="581,580,575"]

what I have to do to show the gallery for this custom post type?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.