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

    http://pastebin.com/b6tXhA4C

    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

    Thanks

    martin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter martcol

    (@hotmale)

    Anyone just prepared to give me a nudge here?

    Thanks

    Martin

    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.