I kind of feel like I’m missing something obvious, but maybe I’m not. What about the admin_notices hook, seems like the obvious choice to me. There are some admin CSS classes available you can use, like updated, error or update-nag, or you can of course add your own styles, like asked and answered here or here.
Code:
<?php
function my_cpt_info() {
if ('edit-my_cpt' === get_current_screen()->id) {
?>
<div class="updated">
<p>
<?php _e('Some information about my CPT...', 'my-text-domain'); ?>
</p>
</div>
<?php
}
} // function my_cpt_info
add_action('admin_notices', 'my_cpt_info');
?>
Related Posts:
- Exclude drafts in all() view of edit.php
- WordPress Delete hook with wp_delete_post function?
- Custom Theme Want To Remove One Category From All Displays
- I am unable to publish/update post
- Adding buttons to Add New Post and Add New Page
- issue in wordpress auto delete post and redirect to another 1
- wp query custom orderby not custom field
- Checking if some condition is matched before inserting post into database
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- CPT archive redirects to single post
- Show posts by a custom post author
- Hide a specific category in admin All Posts page (WordPress)
- Display Meta Values in Custom Filter – Admin Custom Posts
- Custom loop pagination links not working
- Prevent Delete Attachment by URL or When Submit
- Enable Comments Box On Custom Post Type
- wp-cli post create & media import issues
- How to access $post from a callback function
- How can i limit the number of posts created per category?
- Search results posts_orderby and ID
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- WordPress custom Query for Posts in Category display posts multiple times
- Responsive images with custom image size
- Making a custom Pagination for multi page blog post
- Updating post data on save (save_post vs wp_insert_post_data)
- Lost draft under all posts and drafts
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Editing the default page to show all posts, rather than most recent ones
- Unable to restore from backup – how to obtain old blog posts?
- Automatically add date to the auto generation of post slug
- Permission issue with custom post type – not added to menu – by plugin
- Duplicate Custom Post Type and Taxonomy Slug
- How could I change my Permalink from blog to custom structure? [closed]
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Calling Different Custom Post Timestamps in a table
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- Simultaneous admin updates causes custom fields to not update
- Hook in to add new post link wp admin?
- custom post template file not shown, instead all the time 404.php
- Set Default Category to Username
- How to allow visitors to filter posts by multiple taxonomies
- Copy post to separate database with “add_action(….)”
- show custom post type category dropdown sorting result on same page
- plugin to post from admin to flickr [closed]
- Custom Post Type Rewrite To Include Parent Page(s)
- Thumbnail & Category link aside post
- Hooking into the post editing screen for an existing page only
- Trying to alter the post_content through the_post
- How to include my own css in post
- Call Web Services on post first publish
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- Retrieve only posts from a specific user in wp-admin/edit.php
- Adding an Archive button to posts page for administrators
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- How to dynamically parse and transform post/page content before displaying it?
- Develop Admin Panel Page
- How show categories in admin and get that selected to show posts in index
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- What does WordPress do if I save a post without content/title? [duplicate]
- Adding bootstrap classes to video shortcodes
- Change post-slug using wordpress API? Change permalink of a post using php / jquery?
- Format latest/newest post differently
- Custom taxonomy archive page problem
- Tell WP to use a specific template file in posts
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- preg_replace not removed “class”
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- why the same code got different results when using query_posts in functions.php and index.php
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Fast publishing in wordpress
- Divs appearing everywhere in post content
- Is codex right on deleting post?
- Which file do I need to edit the All Posts page in the admin area?
- Modify posts listing at back end
- Check if a custom post type has already been created
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- Create a custom posts page
- How do you search for a post or page with a certain url on the WordPress admin panel?
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- Hook for changing excerpt content when excerpt not set
- if in category but only with post meta