I have two custom post types created (using Types
plugin) with a bunch of custom fields.
I need to add a help information, instructions for admins that will show at the top of add new/edit CPT page of dashboard.
How can I add a text visible only on those two pages (add/edit post type 1
and add/edit post type 2
)?
Try this:
It will result in something that looks similar to this:
http://i.stack.imgur.com/5rU66.png
You can also add meta boxes with the content, which help the users. This is more useful. The writers can hide this box and set their personal options to hide the hints from you, if is not necessary for the writers. To add the boxes to the different post type use the specific hooks:
add_meta_boxes_xxx
,xxx
is for thepost type 1
andpost type 2
.Small hint to identifier hooks use the plugin Debug Objects, list Hooks and screen info to find the right anchor.
A screenshot say more, how I find the hook.
You can add the help text above the meta boxes in the Edit Screens easily when using a plugin like ACF or Types.
Accomplish it by using
edit_form_top
hook. Code –