Edit, Quick Edit & Delete Links for Custom Post Type

I created a Custom Post Type (donations) and I use Advanced Custom Fields (ACF) to dynamically add posts via a front-end form. All works, but when I view the posts from the admin area, the usual “quick action” links (Edit, Quick Edit & Delete) are missing. Only the option to view the post exists.

Not sure if this is an acf thing or a custom post type thing or even a permissions thing. Any pointers would be greatly appreciated.

Be advised:

I researched this post which has a similar issue, but the problem here was a missing title, I AM using the title (although it is dynamically populated via acf).
This post also seems to focus in on the issue occurring if title is missing. Neither is my issue.

The donations Custom Post Type

function wpdev_donations_cpt() {

$labels = array(
‘name’ => _x( ‘Donations’, ‘Post Type General Name’, ‘wpdev’ ),
‘singular_name’ => _x( ‘Donation’, ‘Post Type Singular Name’, ‘wpdev’ ),
‘menu_name’ => __( ‘Donations’, ‘wpdev’ ),
‘name_admin_bar’ => __( ‘Donations’, ‘wpdev’ ),
‘archives’ => __( ‘Donation Archives’, ‘wpdev’ ),
‘attributes’ => __( ‘Donation Attributes’, ‘wpdev’ ),
‘parent_item_colon’ => __( ‘Parent Donation:’, ‘wpdev’ ),
‘all_items’ => __( ‘All Donations’, ‘wpdev’ ),
‘add_new_item’ => __( ‘Add New Donation’, ‘wpdev’ ),
‘add_new’ => __( ‘Add New Donation’, ‘wpdev’ ),
‘new_item’ => __( ‘New Donation’, ‘wpdev’ ),
‘edit_item’ => __( ‘Edit Donation’, ‘wpdev’ ),
‘update_item’ => __( ‘Update Donation’, ‘wpdev’ ),
‘view_item’ => __( ‘View Donation’, ‘wpdev’ ),
‘view_items’ => __( ‘View Donations’, ‘wpdev’ ),
‘search_items’ => __( ‘Search Donations’, ‘wpdev’ ),
‘not_found’ => __( ‘Donation Not found’, ‘wpdev’ ),
‘not_found_in_trash’ => __( ‘Donation Not found in Trash’, ‘wpdev’ ),
‘featured_image’ => __( ‘Donation Featured Image’, ‘wpdev’ ),
‘set_featured_image’ => __( ‘Set donation image’, ‘wpdev’ ),
‘remove_featured_image’ => __( ‘Remove donation image’, ‘wpdev’ ),
‘use_featured_image’ => __( ‘Use as donation image’, ‘wpdev’ ),
‘insert_into_item’ => __( ‘Insert into donation’, ‘wpdev’ ),
‘uploaded_to_this_item’ => __( ‘Uploaded to this donation’, ‘wpdev’ ),
‘items_list’ => __( ‘Donations list’, ‘wpdev’ ),
‘items_list_navigation’ => __( ‘Donations list navigation’, ‘wpdev’ ),
‘filter_items_list’ => __( ‘Filter Donations list’, ‘wpdev’ ),
);
$capabilities = array(
‘edit_post’ => ‘edit_post’,
‘read_post’ => ‘read_post’,
‘delete_post’ => ‘delete_post’,
‘edit_posts’ => ‘edit_posts’,
‘edit_others_posts’ => ‘edit_others_posts’,
‘publish_posts’ => ‘publish_posts’,
‘read_private_posts’ => ‘read_private_posts’,
);
$args = array(
‘label’ => __( ‘Donation’, ‘wpdev’ ),
‘description’ => __( ‘Add, Edit, Delete Donations’, ‘wpdev’ ),
‘labels’ => $labels,
‘supports’ => array( ‘title’ ),
‘hierarchical’ => false,
‘public’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘menu_position’ => 5,
‘menu_icon’ => ‘dashicons-groups’,
‘show_in_admin_bar’ => true,
‘show_in_nav_menus’ => true,
‘can_export’ => true,
‘has_archive’ => true,
‘exclude_from_search’ => true,
‘publicly_queryable’ => true,
‘capabilities’ => $capabilities,
‘show_in_rest’ => false,
);

register_post_type(‘donations’, $args);

}

add_action(‘init’, ‘wpdev_donations_cpt’, 0);

The acf_form displayed on the front-end

acf_form(
array(
‘post_id’ => ‘new_post’,
‘form’ => true,
‘new_post’ => array(
‘post_type’ => ‘donations’,
‘post_title’ => ‘Donation_#’ . $timestamp,
‘post_status’ => ‘publish’
),
‘return’ => ‘%post_url%’,
‘submit_value’ => ‘Add Donation’,
)
);

Read more here:: Edit, Quick Edit & Delete Links for Custom Post Type

Leave a Reply

Your email address will not be published. Required fields are marked *