Trimming Down the Author List
The Blog Herald has changed ownership a couple of times, and with each change of hands, a new set of editors, columnists and contributors comes in. You can therefore expect the list of authors to be quite long–in fact, it was becoming longer than any item on the blog’s footer. We therefore decided to trim down the list to the current set of contributors. This includes new ones, those who stayed on from the previous batch, as well as previous editors Matt and Duncan.
This wasn’t so easy, though, since WordPress doesn’t support excluding certain user levels in the author_list template code. By default, you can only exclude the username admin, and users who have made zero posts. We earlier thought that the easy way would be to move all old posts under the admin account, but that wouldn’t be fair to the original authors. So in the interest of blogging ethics, we decided to use some WordPress kung fu so that the author list will be trimmed down, but still keeping the old posts attributed to the original authors.
J. Angelo did the hack using the deprecated user_status field in the WordPress users table on the database. This defaults to 0, so we marked users to be excluded with 1 (or any number for that matter). We then replaced the line WHERE user_login <> ‘admin’ with WHERE user_level = 0 in the /wp-includes/template-functions-author.php file. It’s not very elegant, but it works. We’re hoping that either WordPress gets to adopt this functionality in upcoming versions, or perhaps someones can make a plugin for this purpose soon–or maybe we’ll make one ourselves!
So in case you’re wondering, all the previous articles are still there, along with proper author attribution. Author archives (including past authors) have been added under the Blog Herald archives page.
Works for me! Although, I think I would modify Ed Lee’s nickname from just “Ed” to his full name .. and .. who is Oneshot?
“One Shot” is coming on in the next few days — full name TBA. ;)