How To Add Prologue-Theme Posting To Your WordPress Theme—in 2 minutes

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).

Quick Post Pre-styling

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.

A Prologue-style quick post

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!

Don't forget: You should follow me on twitter here.

Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

30 Comments

  1. Posted February 20, 2008 at 12:03 am | Permalink

    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 :)

  2. Posted February 20, 2008 at 4:15 am | Permalink

    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 :

  3. Posted February 20, 2008 at 6:40 am | Permalink

    No problem, SP and jf. I have a vested interest in seeing this advanced—I want to use it myself!

  4. Posted February 20, 2008 at 11:29 am | Permalink

    who would of thought of this!? Only you Ian.. only you. lol

    great work, “thinking outside the box.”

  5. Posted February 20, 2008 at 11:58 am | Permalink

    My reputation evidently precedes me. :)

  6. Posted February 20, 2008 at 9:56 pm | Permalink

    Cool! Nice to see the Prologue work is finding more and more uses. :)

  7. Posted February 21, 2008 at 6:23 am | Permalink

    Thanks for stopping by Matt!

  8. Posted February 27, 2008 at 11:35 pm | Permalink

    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.

  9. Posted February 28, 2008 at 7:05 am | Permalink

    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_name in line 3 of post-form.php to $user->display_name. Easy as cake.

  10. Posted February 28, 2008 at 7:01 pm | Permalink

    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?

  11. Posted February 28, 2008 at 8:54 pm | Permalink

    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.

    • xx
      Posted December 7, 2009 at 2:39 pm | Permalink

      hmmm good

      • xx
        Posted December 7, 2009 at 2:40 pm | Permalink

        good done

  12. Posted February 28, 2008 at 11:23 pm | Permalink

    Yeah, there has to be something. Maybe some code to center the post box. Work is being done. I’ll let you know.

  13. Posted March 9, 2008 at 11:06 pm | Permalink

    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?

  14. Posted March 9, 2008 at 11:14 pm | Permalink

    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?

  15. Posted March 10, 2008 at 5:57 am | Permalink

    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.

  16. Posted March 12, 2008 at 12:00 pm | Permalink

    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.

  17. Posted April 12, 2008 at 5:57 pm | Permalink

    Gosh, really good tips, I will set up it on my blog, cool for registered users of my blog!

  18. Posted July 11, 2008 at 2:15 pm | Permalink

    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?

  19. Posted July 11, 2008 at 3:52 pm | Permalink

    Not sure, Ed. I’d fiddle around with it on a test blog. Might have something to do with your theme.

  20. Posted July 13, 2008 at 8:35 am | Permalink

    Hi Ian, I already solved the problem. Some file was missing :p

    • Posted February 19, 2009 at 6:50 am | Permalink

      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

  21. Posted September 1, 2008 at 5:45 pm | Permalink

    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.

    • Posted February 22, 2009 at 6:25 pm | Permalink

      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

  22. Posted October 18, 2008 at 1:00 pm | Permalink

    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?

  23. Posted October 24, 2009 at 12:45 am | Permalink

    I’m not sure, but please tell me, that this hack can also be applicable with the P2 theme, instead of Prologue.

    Thanks!

  24. Posted October 27, 2009 at 2:45 am | Permalink

    Hi Ian,

    I’ve just installed MNML v1.3 and am having the same problem Austin is having, as well as a few of the people here (http://themeshaper.com/mnml-a-tumblelog-style-wordpress-theme/) have also mentioned the same login looping issue.

    I write something, hit post, takes me to dashboard login even though I am logged in, then goes back to the reloading the site and removing all I had just typed.

    Great theme though. I’ve got Asides created and it works a treat as long as I write stuff via the dashboard.

    Cheers,
    Mike.

  25. Posted December 3, 2009 at 9:21 pm | Permalink

    Наш сайт – самый легкий и быстрый способ найти партнера, имеющего схожие с вашими сексуальные предпочтения!
    http://leporno.eu

  26. Paul
    Posted January 3, 2010 at 11:32 pm | Permalink

    Hi Ian

    In case u still read the comment.

    This is a great post, but it’s dated.
    The link to prolougetheme.org/download is not working too ( at time i am typing this.)
    or it’s totally discontinued ( and become p2 theme ? )

    Moreover, some of the comments indicated problem when it’s actually implemented,
    I checked Joseph Scott and Matt Thomas ’s website to see the source but couldn’t find any.

    So if someone could update this post ( to confirm if it’s still workable ) that would be great.

    Thanks.

11 Trackbacks

  1. By Changed Themes Again, More MNML Style on February 27, 2008 at 11:36 pm

    [...] 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. [...]

  2. [...] WordPress Theme 支持类似 Prologue 的功能(直接在页面上发文章),这篇文章详细的讲解了如何在 WordPress 默认主题上添加 Prologue [...]

  3. By AustinWilliams.org » links for 2008-02-29 on February 28, 2008 at 9:43 pm

    [...] 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 … [...]

  4. [...] 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. [...]

  5. [...] Find the solution here.   [...]

  6. [...] 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 [...]

  7. By links for 2008-05-27 - Chroniques du web on May 26, 2008 at 7:34 pm

    [...] How To Add Prologue-Theme Posting To Your WordPress Theme—in 2 minutes (tags: wordpress themes blogging prologue tumblr) [...]

  8. By Post asides directly on your blog | BlogoSquare on August 16, 2008 at 1:29 pm

    [...] 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 [...]

  9. By Short Posts (Tumblelog) Styling - DIY Themes Forums on October 3, 2008 at 11:39 am

    [...] 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 [...]

  10. [...] 04:16:28 pm on April 4, 2009 | # | 0 How To Add Prologue-Theme Posting To Your WordPress Theme—in 2 minutes. [...]

  11. By Design Intellection on April 6, 2009 at 8:52 pm

    [...] on adding Prologue-theme posting to any WordPress installation. Perfect for asides such as this [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution. In addition, you may find yourself fitter, happier and more productive. Comment away.

Subscribe without commenting