Support » Fixing WordPress » CPT Plugin Wipes Out Media Library

  • I created a Custom Post Type and put it in a plugin

    When I activate it my media library appears to have no media in it. I can see the media files by going to add media in the post editor but nothing appears in the library.

    When I deactivate it everything goes back to normal

    Any guidance would be appreciated



Viewing 2 replies - 1 through 2 (of 2 total)
  • Anyone just prepared to give me a nudge here?



    Not tested, but you should register the post type with a name, instead of ‘post_type’, in line 54:

    register_post_type( 'post_type', $args );

    you should probably do:

    register_post_type( 'testimonial', $args );

    Also I would recommend adding a prefix to your function instead of using just ‘custom_post_type’ as a function name.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CPT Plugin Wipes Out Media Library’ is closed to new replies.