Require users to choose a post category before saving a draft or publishing. After activation all users will be required to choose a category before saving a draft, updating a post, or publishing a post. This applies to normal posts only, not custom post types. If you are a developer you may modify the plugin code to fit your custom post type needs.
Easy Installation
- From your WordPress admin go to Plugins > Add New
- Search for “require post category“
- Click the Install Now link for Require Post Category
Manual Installation
- Download Require Post Category from the WordPress plugin repository
- Extract the file to your
wp-content/plugins
directory - Activate the plugin
Marco says
Hello,
I’ve installed this plugin recently and it works well but i found a problem with it, when i want to create or update a page i got the message showing so i must disable it when i work on a page because of course page don’t have categories…
Will it be corrected in the next version ?
Josh Hartman says
You’re absolutely right, the script shouldn’t be included when adding/editing pages, I forgot that pages are just another post type. I’ll release a new version with the fix tomorrow.
Josh Hartman says
1.0.1 has been released, which fixes the issue of the alert coming up when adding/editing pages.
Aqeel says
Thanks for this plugin – it’s given me some foundation to work out my problem. Instead of the categories being checked, I wanted to do a check on the text area of a metabox. I used to .value instead of length, but seem to get an error with the click event. could you point me where I could be going wrong?
Josh Hartman says
If you put your code and error up on pastebin I can take a look. Your code for checking the textarea should be similar to this:
MIke says
This plugin caused problems with my “Featured Images”
When this plugin is enabled, my Featured Images no longer save, they are removed after publishing.
Not sure why?
Josh Hartman says
I’ll check this out, thanks for dropping a comment.
UPDATE: I’m unable to replicate your issue. I was able to choose a featured image for a post and update the post without problem. I also created a new post, set a featured image, and saved a draft without issue. It sounds like you may be having an issue with Require Post Category conflicting with another plugin. If you find out anything more let me know. Thanks!
Leo Caseiro says
Hi, I update this plugin using language translation.
First, replace yout string:
alert('" . __('Oops, please select a category before publishing this post.','require-post-category') . "');
Last Create this function and insert this action:
add_action( 'init', 'rpc_translation' ); function rpc_translation() { load_plugin_textdomain('require-post-category','wp-content/plugins/require-post-category'); }
Now, insert a poedit file.
Josh Hartman says
Thanks for the addition Leo! I’ll work on incorporating it when i have some time.
Rudd says
Come across your site from WPMU.org’s article. Do you have anything like this for tags? Basically I want the tag to be auto populated so I can simply choose from existing tags.
Josh Hartman says
Not sure exactly what you mean. Are you saying you want a default set of tags to be added to every new post?