Require Post Category

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.

Download

Version: 1.0.4
Release Date: 12/6/2013
Compatibility: WordPress 3.0+

  Require Post Category (31.8 KiB, 69 hits)

Installation

  1. Extract the file to your wp-content/plugins directory
  2. Activate the plugin

Screenshot

Require Post Category Screenshot #1
Click image to enlarge

Comments

  1. 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 ?

    • 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.

  2. 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?

    • 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:

      if($('#custom-metabox textarea').val()==''){
      	alert('Oops, please fill out the custom-metabox textarea before publishing this post.');
      	e.stopImmediatePropagation();
      	return false;
      }else{
      	return true;
      }
  3. 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?

    • 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!

  4. 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.

  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>