In case you have a self-hosted Worpdress blog which has multiple authors you may have noticed that you don’t have lots of option to show information about each one. You can have each author create a post for himself and link it from the sidebar (Which is how Debunking Christianity does it), or you can create a page for each one after they provide you some information about themselves. Finally you can just leave each author’s page to be the default list of posts.
I wasn’t satisfied with either of those options so I looked around and found something better. So I have just finished with my custom member list setup at the Antichristian Phenomenon and I thought I’d share how I did it in case anyone wishes to implement it as well.
I started after I discovered this excellent guide from WPDesigner. Although I didn’t need the role manager, the rest of the instructions were perfect for my purpose. So I installed the necessary plugins (plus Register Plus to stop spammers registering) and started adding fields.
I then needed to display those fields in each author’s page somehow. In also wanted to do that without making the page totally different from the reast of the site. So I copied the archive.php file to author.php. I enterred the file and inserted all the necessary variables for my fields (as described in the guide) and deleted all archive loops except the author’s. This way the user visiting the author page could see the author profile but also a list of articles they have written.
The curauthor variable was used to grab information for some of the default fields. Unfortunately the Wp User Manager plugin does not give you the names for all the default wordpress fields but fortunately the documentation in curauthor is complete. I copied the html div the archive loop was in (so as to have the same format) and created a little list to show each author’s profile. Here’s how it looks like currently
Once that was done, I decided to see if I could also put comments in each author’s page as well. Unfortunately, just putting the php call for the comments template between the info and the archives did not work. Apparently WordPress does not expect comments on archive pages. However since I am using Intense Debate Comments at the moment I figured that they would be agnostic on where I am putting their script.
Unfortunately since IDC works through the wordpress comments template, where that does not appear, so does IDC. I managed after all to work around this by copying the script itself into the template. It wasn’t easy to get the code for this since IDC insists on providing you with a WP plugin instead of allowing you the option to paste the script somewhere. I finally got the code by telling IDC that I wanted to install it on my gallery. Unfortunately, the script then had the wrong ID and I needed the correct one to have my comments logged at the correct blog. For this, I was able to just edit the WP plugin code and copy the ID from there. So I pasted the script in the template itself and, lo and behold, it worked! I now had comment capability on each author’s profile page
Once this was done, I made a quick test comment to check if it works and noticed that IDC was logging a strange page title for the Author’s profiles. It seems that my theme is using a title for author archives as if they were a category archive and that would not do. I thus edited my header file and placed an if statement to check if it is an author page. On a positive, I changed the page to show a more appropriate title as well as the author’s nickname (through curauth again). Unfortunately IDC still kept grabbing some weird titles (or not at all) but it’s not caused by the title anymore.