P2 is one of the sweetest wordpress themes out there (see http://ma.tt/2009/05/how-p2-changed-automattic/), but for certain applications it needs tweaking. At MyChances.net, we wanted to give each of our members their own blog so they could write about the college application process. To accomplish this, we needed two additional features: 1) Threaded comments for author pages. If members are going to feel like they have a legit blog, they need to have user comments on the articles they are writing. 2.) If the logged in user is the author of the blog, that user should see the “Hi, watcha up to?” quick post box on their blog – NOT just on the main page (aka the “firehose” – thanks Twitter!).
Adding comments to author pages in the P2 wordpress theme is an easy process. You just need a few minutes and a very small amount of programming knowledge.
Step 1: Open up wp-content > themes > P2 > entry.php.
Step 2: find the following line: if ( ( is_home() || is_front_page() )) $withcomments = true;
Step 3: change the line to if ( ( is_home() || is_front_page() || is_author() ) ) $withcomments = true;
Step 4: Save entry.php, and make sure that you upload it to your P2 directory.
Step 5: Profit.
If you need comments on the tags page, you can simply change the line to this:
if ( ( is_home() || is_front_page() || is_author() || is_tag() ) ) $withcomments = true;
Essentially you are adding in some logic so that if the page the user is looking at “is an author page” OR “is a tag page” then turn on the withcomments variable so the page is allowed to show the threaded comments feature which we all love.
You can see this functionality live here:
http://www.mychances.net/membership/blog/author/Brent/
and here:
http://www.mychances.net/membership/blog/tag/member-blogs/
Now for our second need, showing the quick post box on author’s own author page (if the logged in user is the author).
Step 1: Open up wp-content > themes > P2 > author.php.
Step 2: At the very top of the page, add this line in the php brackets like so:
<?
get_currentuserinfo();
?>
This allows you to access information about the current user, such as their username. To let php see the username, you can access the data like this:
$current_user->user_login (So if you want to echo out the username of the logged in user, you can put <?=$current_user->user_login?>
Step 3: Just below the line that has <div class=”sleeve_main” id=”userpage”> insert this block of code:
<?
if( current_user_can( ‘publish_posts’ ) && $current_user->user_login==$author->user_nicename) require_once dirname( __FILE__ ) . ‘/post-form.php’;
?>
This checks two things. 1) Can the current user even post things. 2) If the current username is equal to that of the author. If these criteria are met, it will display the “post form” which is the quick post box. Otherwise, nothing shows up, so it just looks like a blog page for a normal visitor.
That’s it! Please let me know if you have implementation questions.
Brent

Thank you! A question: will the author/tag-page automatically update itself?
Niska – Yes, we’ve tested it and it retains the live-update functionality that you’ve come to expect from the P2 homepage.
And we will continue to test that. If there are any other parts that don’t act as intuitively as the main page, I’ll check if there is a quick fix and post that tutorial as well.
Curious how have your users felt about it so far?
there hasn’t been an explosion of blogging yet, but so far the users that are blogging seem to enjoy having a place to speak their mind on the college admissions process, and the P2 theme gives a great template for having real discussions about the college admissions process.
Позволю себе не согласится
I will give it atry, really great thing.
I wonder if You can give me some hints where to find following features for P2:
1) Show blog only to registered users.
2) Send user invitation
3) upload pictures (3 or 4 ) to the authors page
Would be great to have some info, I couldnt find anything.
Аналоги имеются?
Очень понравился ваш блог! Подписался на rss. Буду регулярно читать.
Прошу прощения, что вмешался… У меня похожая ситуация. Приглашаю к обсуждению.
К сожалению, ничем не могу помочь. Я думаю, Вы найдёте верное решение.
Hi
The current version of P2 no longer has an author.php page. I tried this on the page.php page but can’t get it to work. Any ideas?