With multi-author WordPress sites, different authors will often be expected to post content to different categories. For example, a news site might have one author for political news, and another for sports news, and another for entertainment news, and so on. These authors’ Posts might be assigned to “Politics”, “Sports”, and “Entertainment” categories respectively, and then displayed in the appropriate place on the site based on those categories.
The only problem with this is that it relies on the authors remembering to assign their Posts to the right category. If they forget, then you’ll have content appearing in the wrong place on the site. Not a massive problem, as it’s easily fixed, but it would be nice to be able to make sure that it doesn’t happen.
There’s a plugin that supposedly lets you do this: Bind User to Category. With Bind User to Category, you can assign users a category to which all of their Posts will then be assigned, irrespective of which Category boxes they check or don’t check on the Write > Post screen.
The only problem is that Bind User to Category, which was last updated in March 2008, doesn’t seem to work with recent versions of WordPress. You upload and activate, and nothing seems to have happened.
The problem is fairly straightforward, and easily fixed. Working with v0.2b, line 79 of bind-user-to-cat.php looks like this: add_management_page(__('Bind user to category'), __('Bind user to category'), 10, basename(__FILE__), "butc_form");. This is supposed to create a sidebar link to the Bind User to Category admin page, but the add_management_page() function is deprecated, so it doesn’t work, making the plugin admin page inaccessible and giving the impression that the plugin doesn’t do anything.
Replacing this line with add_submenu_page('users.php', __('Bind User to Category'), __('Bind User to Category'), 10, basename(__FILE__), "butc_form"); fixes the problem, adding the Bind User to Category admin page link to the Users menu.
As far as I can tell, everything else about the plugin still works fine in WP 2.8, so all you need to do to use Bind User to Category with WP 2.8 is update that one line of code.
September 10th, 2009 at 8:26 pm
Awesome, thank you for this. I’ve updated my plugin. Question though…do you know how to apply Bind User to Cat to the Quickpress on the dashboard? It works when you’re logged in as the bound user under write -> post, but not on the Quickpress. I’ll look around, but thought I’d post the question here.
September 11th, 2009 at 4:15 pm
Thank you very much. Onfortunaly it works setting 1 user with 1 only fixed category. Do you know something to link 1 user with 1-N categories?
Thanks.