I have a multi-author website and I use the WyPiekacz plugin to require that authors add 1-5 tags, select only a single category, and include a featured image (and require minimum dimensions for the featured image).
WyPiekacz also can restrict title/content min/max length. WyPiekacz is great, but it will only tell the author after they have done something wrong, not let them know the requirements before they make a mistake.
I would like to be able to add a note/reminder to each meta box to guide the author. Currently I have written the notes directly into the wordpress files. Here is a screen shot of my addition.
Featured image meta box located in wp-admin/includes/post.php
Tags and categories boxes located in wp-admin/includes/meta-boxes.php
I would like to include these notes in the functions.php file or as settings in WyPiekacz.
I am not a coder, so any assistance would be greatly apprectiated.
You should never edit the core files of WordPress.
Instead you should only ever edit Plugin files and or Theme files (Plugins or Themes folder)
One of the easiest was to achieve this would be via jQuery;
Save the above into a alerts.js file (or name it whatever you want). Place this file in your theme folder
/theme_name/js/
for organizational purposes.Then in your functions.php file paste;
This will enqueue and load your alerts.js file only in the admin section of your site and as such it will then apply your jQuery by appending a
div
with an ID selector of your choice followed by your desired text.This part
('<div/>', {
will create a self-encloseddiv
for you, i.e.<div id="your-note">your note here...</div>
UPDATE
You might in effect try this as a template for multiple items;
Using the “admin_post_thumbnail_html” thumbnail filter would be the best way to add text to the Featured Image metabox and avoids using JavaScript / jQuery:
View the “admin_post_thumbnail_html” developer reference on wordpress.org
You’d use it by adding something like this to functions.php:
First I’d like to re-iterate @userabuser. You should never edit the core files of WordPress. In fact, you should avoid editing plug-ins and themes (use a child-theme instead) since changes are lost on an update, and you should update!
I would follow the method outlined in these questions:
and de-register the existing metabox used (I think as @userabuser uses, the ID is
#tagsdiv-post_tag
). Then re-register it, allowing you to create a function which defines its insides as explained in the above posts.For your purposes however, the function you want to mimic is
post_tags_meta_box()
, found here: http://core.trac.wordpress.org/browser/tags/3.3/wp-admin/includes/meta-boxes.php#L265Simply use the contents of that function in your own custom call back, and edit to display your messages.