WordPress.org

Forums

Making posts exclusive for just one category (1 post)

  1. correodefelipe
    Member
    Posted 9 years ago #

    Hi, this is my first contribution to wordpress-2.0.1 so I it functions.

    I wanted to change my post form in a way that authors can only select one category for each post. What I did was to edit the admin-functions.php in the wp-admin folder. In this file look for this piece of code (line 560 for the 2.0.1 version):

    function write_nested_categories($categories) {
    <input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : ""), '/> ',

    change the word "checkbox" for "radio" and that's it!

Topic Closed

This topic has been closed to new replies.

About this Topic