A Better Bio Box

I recently had a request from a clients running a multi-author blog, to incorporate a multi-author bio box. They really needed to credit numerous team members associated with a single blog post or article. It’s easy enough to add new roles in WordPress these days! WordPress has robust built-in Roles and Capabilities system designed to do exactly what you are looking for, but in my clients case the users needed to switch roles dependent on the Post Category. So the user roles needed to change per category which is difficult to say the least. In their case I decided on implementing the Co-Author Plugin and simply tweak the plugin output using a if statement on the single.php file.


As you have probably noticed these scripts were designed for use on a Modeling/Photography site. Assuming you are not running a modeling industry related blog you may need to tweak the base code fields to reflect your own business or special needs.
The [specialty] on line 35 of the code pasted into your users interface is what drives the new roles in the bio.php file. You will need to change both to be the exact same in order to make this function work.After implementing these scripts your wordpress user interface should look something like this:


Now save this code as bio.php

After installing and activating the Co-Author Plus plugin add this code to your theme’s function.php file to extend the user designations and functions.

Add the following to your Single.php file, just below the loop. This will call the bio.php file below. Notice that I keep all of my custom scripts in a “functions” sub-folder. Adjust your path if you do not!

and finally our CSS to make things pretty.


This entry was posted in WebDev. Bookmark the permalink.

Comments are closed.