I create a custom post type. My custom post type link like: http://localhost/le/wp-admin/edit.php?post_type=pdfviewer
In my custom post edit.php page I want to display some content. Now how to add content here. Please see the image below for better understand. Thank you.
To target edit.php, you can use the all_admin_notices action wrapped inside the load-edit.php action:
add_action('load-edit.php', function () {
$screen = get_current_screen();
// Only edit for your custom post type screen
// Here edit-YourPostType
if ('edit-pdfviewer' === $screen->id) {
add_action('all_admin_notices', function () {
echo '<p>Your custom content here!</p>';
});
}
});