How can I enable checkboxes for custom post type posts on their post list – WordPress

To enable checkboxes for custom post type posts on their post list in WordPress, you can achieve this by adding some code to your theme’s functions.php file or by creating a custom plugin. Here’s how to do it:

  1. Open your theme’s functions.php file or create a custom plugin.

  2. Add the following code to enable checkboxes for your custom post type (replace 'gr-item' with your actual custom post type name if different):

function enable_custom_post_type_checkboxes($post_type) {
    if ($post_type === 'gr-item') {
        return 'page';
    }
    return $post_type;
}
add_filter('manage_posts_columns', 'enable_custom_post_type_checkboxes');
add_filter('manage_pages_columns', 'enable_custom_post_type_checkboxes');

This code filters the column list for both posts and pages and enables checkboxes for the 'gr-item' custom post type.

  1. Save the changes to your functions.php file or activate your custom plugin.

Now, when you go to the post list in your WordPress dashboard for your custom post type 'gr-item', you should see checkboxes next to each post title, allowing you to perform bulk actions and interact with the posts.

However, it’s worth mentioning that there may be specific code in your third-party theme that is preventing the checkboxes from displaying, so the only way to know if this will work is to try it out. Best of luck to you!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)