I'm trying to implement a front end delete link such as the one found here (and similar code on other forum posts): http://wordpress.org/support/topic/delete-post-link?replies=11
However, though that works for pages & posts, it returns a WordPress Failure screen for custom post types.
Would anyone know how to make this work for custom post types? Perhaps it's something I need to do when registering the custom post type?
Here's my code for registering the post type:
add_action('init', 'wishlist_register');
function wishlist_register() {
$labels = array(
'name' => _x('Wishlist Items', 'post type general name'),
'singular_name' => _x('Wishlist Item', 'post type singular name'),
'add_new' => _x('Add New', 'wishlist item'),
'add_new_item' => __('Add New Wishlist Item'),
'edit_item' => __('Edit Wishlist Item'),
'new_item' => __('New Wishlist Item'),
'view_item' => __('View Wishlist Item'),
'search_items' => __('Search Wishlist'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'has_archive' => true,
'supports' => array('title','editor','thumbnail', 'author')
);
register_post_type( 'wishlist' , $args );
}