Did you know you can add a quick post section for logged in users to your WordPress Theme? Just like the Prologue Theme? Yep, in about two minutes. Ready? Start the clock.
First, download the latest version of Prologue.
Secondly, copy over post-form.php into your current template directory. If you’re using the default theme (like I am for this example) you would copy it into the folder called “default”. Open it up. For the sake of keeping this tutorial under two minutes I want you to delete the following line from this file.
<?php echo get_avatar( $user->ID, $user->user_email, 48 ); ?>
Now, open up the index.php file from the Prologue theme. See that fine bit of code that starts with <?php if( 'POST' and ends with '/post-form.php'; } ?>? Copy that code. You’re going to paste it somewhere in the next step.
Open up the index.php file from the theme we’re going to Prologue-ize. See that wonderful bit of code at the top, <?php get_header(); ?>? Man, I love that get_header(). Anyway, select it and paste that fine bit of Prologue-code here.
Okay, we’re Prologue-ized. Let’s see what we’ve got (remember, you’ve got to be logged in to see this).

Yikes, we need some styling for this. Open up the style.css file from your now Prologue-ized theme and add the following down near the bottom.
/* Quick Post Form */
#postbox {
margin:3em;
padding:3em;
background:#EEE;
border:1px solid #CCC;
}
#postbox form {
width:100%;
}
#postbox textarea {
width:100%;
margin-bottom:.75em;
}
#postbox label {
display: block;
}
Let’s see what we get now.
Okay, that’s much better. And, hey, we’re done! Did it take you more than 2 minutes?
What’s next?
There’s obviously more that can be done with post-form.php. For starters, it would be nice to have TinyMCE around so you wouldn’t have to type out anchor tags. You’d also want to be able to pick categories (instead of posting to the default category) and if you wanted, enter a proper title (defaulting to the snippet when you don’t bother). As is, it’s great for asides—and asides only.
I haven’t taken a real hard look at adding any extra functionality to this yet. Anyone want to take a crack at it?
Credit where Credit’s due
If you think this is a cool idea, remember: someone else thought of it first. Thanks, Joseph Scott and Matt Thomas!


24 Comments
Interesting. I came across Prologue before, but didn’t think anything of it. I did get the idea the first time around hehe. I’ll play with this when I have time. Thanks for the heads up :)
Hi,
thanks for this tutorial, it’s be good to be able to be “prologuizing” other themes…
I agree with your comments by the way, the formating is really missing at the moment.
I hope they re hearing you :
No problem, SP and jf. I have a vested interest in seeing this advanced—I want to use it myself!
who would of thought of this!? Only you Ian.. only you. lol
great work, “thinking outside the box.”
My reputation evidently precedes me. :)
Cool! Nice to see the Prologue work is finding more and more uses. :)
Thanks for stopping by Matt!
This might be how things are with the Prologue theme, but why does the user’s first name show, instead of their public display name (like when someone logged in leaves a comment)? I think using the public display name would be more useful.
To be honest, Chris. I hadn’t looked into it. But if you want to change it to show the display name, change
$user->first_namein line 3 of post-form.php to$user->display_name. Easy as cake.The only issue I am having is that I use a 3 column template, with the sidebars on either side. The template calls the sidebars immediately after the header, and after pasting in the code with a little bit of editing, the left sidebar is on top of the post box. I’m sure there is some simple css code to shift the box over the correct amount of pixels to get it out where I can see it, but I don’t know what it is. Any ideas?
Not sure about that one, Tapeleg. These things can be really dependent on the theme. Your best bet is to install your theme locally on your computer (or wait for a Sunday night when no one is looking at your site) and fool around with the stylesheet. Good luck.
Yeah, there has to be something. Maybe some code to center the post box. Work is being done. I’ll let you know.
I have multiuser blogger at http://kolumnis.com. When tried your tips, it’s ok to me as administrator. But, post form doesn’t appear for another member. any idea?
Sorry, it’s work to author level. But, i need it also work for contributor that have no right to publish post. Is it possible?
The post form only appears if you can write posts. I’m not sure why you’d want it to appear to a user that can’t write a post. Check out the conditions for post-form.php showing in index.php of the Prologue theme.
Anyone out there care to help me add a Title to the twitter-esque box that results in a title for the post? I’ll buy you a cup of coffee for your troubles.
I tried modding a few areas and it blew up on me.
Gosh, really good tips, I will set up it on my blog, cool for registered users of my blog!
Hi, first of all, thanks for the solution. I am playing around it but encountering a problem when finished posting message. It said
Warning: Cannot modify header information - headers already sent by (output started at /mnt/w0307/d10/s13/b02aa5ae/www/buzzcollege.com/wp-content/themes/facebook/header.php:2) in /mnt/w0307/d10/s13/b02aa5ae/www/buzzcollege.com/wp-includes/pluggable.php on line 694
How to address this?
Not sure, Ed. I’d fiddle around with it on a test blog. Might have something to do with your theme.
Hi Ian, I already solved the problem. Some file was missing :p
what was missing… I have done this to my theme as well… actually before I found this theme… and this error has been baffling me
I wrote a plugin that adds this to any theme if anybody is interested in trying it out. I just put it together today for my own site and haven’t tested it widely, but it might be helpful to someone.
ahhhhh thanks Jon, this is a nice plugin, I have been trying to tackle my issues… and this solves it.. I knew I wanted to use this feature…. but I didn’t know what was causing the probs… I had been up oneside of the code and down the other… great plugin, (oh.. and I modified your plugin) Thank god for GPL
your log out link borks up my theme plus i styled the post button
I tried this and checked my steps, but every time I hit post, it kicks me to the login screen. Even after logging in, the post is not there.
Any idea?
11 Trackbacks
[…] of the neat features of MNML is that the homepage actually allows me to make new posts, much like the amazing Twitter-like Prologue theme from Automattic, the people behind WordPress. […]
[…] WordPress Theme 支持类似 Prologue 的功能(直接在页面上发文章),这篇文章详细的讲解了如何在 WordPress 默认主题上添加 Prologue […]
[…] How To Add Prologue Like Posting To Your WordPress Theme (tags: wordpress themes tips) This entry was written by delicious and posted on February 28, 2008 at 10:43 pm and filed under Delicious. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL. « Frog with a Snail hat (No Ratings Yet) Loading … […]
[…] Har fundet en måde at få den boks man ser når man er logget ind her, over på mine andre sites. Find løsningen her. […]
[…] Find the solution here. […]
[…] it loads the admin panel. However, if you’re using the Prologue theme or a similar theme that places the “write post” form on the front-end of your site, you probably want to present registered users with the front page […]
[…] How To Add Prologue-Theme Posting To Your WordPress Theme—in 2 minutes (tags: wordpress themes blogging prologue tumblr) […]
[…] Steward tells you in his 2 minutes post, How To Add Prologue-Theme Posting To Your WordPress Theme, which will let you have a writing form on your blog. You will end up with something like that […]
[…] had a look at the Prologue theme, and tried to implement it’s quick posting into Thesis (as seen here). I got it to work and post an article, but I’m not sure how to style it. It just looks like a […]
[…] 04:16:28 pm on April 4, 2009 | # | 0 How To Add Prologue-Theme Posting To Your WordPress Theme—in 2 minutes. […]
[…] on adding Prologue-theme posting to any WordPress installation. Perfect for asides such as this […]