WarpConduit Computing

  • Quick Tips
  • Web Development
  • WordPress Plugins
  • Home
  • Passphrase Generator
  • Password Generator
  • About
  • Contact

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.

Easy Installation

  1. From your WordPress admin go to Plugins > Add New
  2. Search for “require post category“
  3. Click the Install Now link for Require Post Category

Manual Installation

  1. Download Require Post Category from the WordPress plugin repository
  2. Extract the file to your wp-content/plugins directory
  3. Activate the plugin

Screenshot

Require Post Category Screenshot #1
Click image to enlarge

Comments

  1. Marco says

    February 17, 2011 at 5:25 AM

    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 ?

    Reply
    • Josh Hartman says

      February 17, 2011 at 11:21 PM

      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.

      Reply
  2. Josh Hartman says

    February 17, 2011 at 11:50 PM

    1.0.1 has been released, which fixes the issue of the alert coming up when adding/editing pages.

    Reply
  3. Aqeel says

    March 31, 2011 at 6:24 AM

    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?

    Reply
    • Josh Hartman says

      March 31, 2011 at 8:43 AM

      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;
      }
      
      Reply
  4. MIke says

    August 12, 2011 at 1:38 PM

    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?

    Reply
    • Josh Hartman says

      August 13, 2011 at 8:49 PM

      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!

      Reply
  5. Leo Caseiro says

    August 23, 2011 at 3:32 PM

    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.

    Reply
    • Josh Hartman says

      August 23, 2011 at 11:59 PM

      Thanks for the addition Leo! I’ll work on incorporating it when i have some time.

      Reply
  6. Rudd says

    September 29, 2013 at 5:38 PM

    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.

    Reply
    • Josh Hartman says

      October 3, 2013 at 9:33 PM

      Not sure exactly what you mean. Are you saying you want a default set of tags to be added to every new post?

      Reply

Leave a Reply Cancel reply

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

Connect

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • YouTube

Recent Posts

  • How to Permanently Remove the “Learn about this picture” Spotlight Wallpaper Icon From Your Windows Desktop
  • How to Quickly Test a Fax Machine
  • Extremely Useful Applications for Web Development and IT Tasks

Tags

automatic benchmark bigint class composer css embed escape event font function gzip helper htaccess html htmlspecialchars image increment javascript jquery list magento media mysql number observer opencart order output photo php profiling random redirect rijndael software text type ubuntu url windows windows 7 wordpress xampp xss

Blogroll

  • CodeIgniter
  • Fusion Forward
  • jQuery
  • Nettuts+
  • Smashing Magazine

© 2025 WarpConduit Computing. All Rights Reserved.