BOMBOLOM.COM

(wordpress) Plugin: Author Complete Post List

Posted by José Lopes.

While setting my site with Wordpress I created an author.php to display information about the authors of the site, much as it is defined in Author Templates. I wanted to have a description about the author itself and a list of posts writen by him.

This plugin displays the complete post list of one Author, with the total number, including the co-author participations.

I was having some problems setting up the authors properly so, since I didn't any thing to solve it, I created this Plugin.
The problems appeared while displaying the list of posts of the author:

Download

You can download one of the files that serves you better: author-complete-post-list.zip or author-complete-post-list.tar.gz

Installation

How to use it

As I said previously the Plugin was created to be used in author.php so the next example is based in this assumption.

Taking the Wordpress php example, two code lines are enough to get the author's post list.

<?php total_posts($author, $curauth->user_login, 'pt_PT') ; ?>

<?php full_post_list($author, $curauth->user_login, 'pt_PT') ; ?>

Explaining the code:

Output example:

This author has 3 post(s):
    - Post 3 in 06/07/2007, stored at Nowhere
    - Post 2 in 06/07/2007, stored at Nowhere
    - Post 1 in 05/07/2007, stored at Nowhere

Final notes

This Plugin was tested with Wordpress v.2.2, so any info about other version is welcome.

There are no special requirements to install or use this Plugin, nevertheless, since one of the major goals is to include the co-author posts it would be wise to make attention at how you define the co-author thing. In this way I end this presentation with the following points:

2007.07.23 | There's more... | Comments 2 | Tags , ,
Comment by simone on Tue Oct 30 16:17:51 2007
Your plugin is very nice and help me but not work, mybe becouse I have the file author-template.php and not the file author.php?
Thanks
Comment by José Lopes on Thu Nov 1 23:28:43 2007
Hello Simone
That is right, you have to have a file author.php on your theme directory, or at list the $curauth constant defined like on the Wordpress Sample Template File for the author.php (see the example link on the post).
The author-template.php should not be changed unless you really now what you are doing. It sets a group of function to be used by your Wordpress.
Try to create an author.php file and make the changes I speak about on the post and it should work.

I will release a new version with the internacionalization so people don't have to set the language by hand (functions third option). Don't worry because when updating on your site you will not need to change anything else.
It should be out within one month as soon as I make a break on my professional projects.

Deixe a sua mensagem:

Nome:


E-mail:


URL:


Comment:

Secret number

To send you comment you must insert the "secret number" on the box


Made with PyBlosxom | Add to Google