Articles in this series

102 responses to “A WordPress forum plugin using custom post types”

  1. Sayontan

    Wow! Never thought of this as a use for post types, but it surely makes a lot of sense.
    BTW, what happened to Kirby Junior?

  2. Tom

    Justin, this looks really nice and I went over to Pop Critics to check it out as well. How long until you think it may be released? Will there be a cost?

  3. Chocks

    Hey Justin, this is amazing! I was expecting a “yet-another-long-technically-detailed post” :-( Hopefully you will? post it later..

    I’m using custom post types as a Q&A section of the site: http://incomejunkie.com/questions/ (usr:usr123) and it works pretty well. I’m still dealing with the deletion of the questions published by the authors.. and some other workarounds that I’d love to implement, but this custom post types thing is a really sweet addition to WP.

    Keep on the great work! (We need to learn more and more from you).

    Thanks

    Chocks

    1. Chocks

      Also, as you said I’m using scribu front-end-editor which rocks.

  4. Ozh

    This rocks *hugely*. Can’t wait to test the plugin.

  5. Joss

    Congrats on this so far Justin, looks very promising!

    Would love to be able to help out in any way – are you going to do a trac with tickets for fixes and patches etc?

    1. Rahul Bansal

      @joss
      I guess when this plugin will be released on wordpress codex, it will get an entry on wordpress trac automatically.

  6. weston deboer

    Matt sort of hinted at something like this for wordpress instead of bbpress. I think this works a lot better than bbpress. I can see how things work easier, say cookies and everything is in one dashboard.

    I see this going and then there needing to be plugins for this plugin.

    Good WORK!

  7. Josh Stauffer

    Justin, your WordPress skills never cease to amaze me. :-)

    I just got done converting an SMF forum to bbPress. I am a newbie to bbPress but I like it’s minimalistic feel and I LOVE WordPress so I figured what the heck. I, too, read about the news of bbPress being converted to a plugin for WordPress.

    I’m really curious as to what benefits you see in a plugin for WordPress that uses custom post types over a standalone bbPress. I read your points above but I am unsure about how I feel on the matter.

    Thanks!

  8. Rahul Bansal

    Justin,

    Are you spying on me? Just kidding! :P

    You won’t believe but today morning I discussed exactly same concept with my fellow developers.
    And I reached home an hour back and started to setup a new wordpress+bbpress on my localhost to see how tough is to get bbPress integrated with wordpress! I was in the middle of checking out bbPress from SVN when I accidentally opened my Google Reader and I see your post there…. :-)

    I am really on cloud 9. :D

    I never thought someone’s wish can be fulfilled at this lightening speed! ;-)

    Thanks a ton.

    -Rahul

  9. Rahul Bansal

    Justin,

    Opened test account on forum and new plugin is really amazing. :-)

    In my sincere efforts to thank you enough, I will contribute import/export module between your forum plugin and bbPress-wordpress plugin whenever later becomes reality in future. We guys are good with importing/exporting data to/from wordpress. We run a service @ bloggertowp and that leaves us with plenty of raw importer/exporter codes.

    I don’t see any reason to wait for bbPress now.

    By the way can we contribute to this plugin in its current stage?

    Thanks again.
    -Rahul

  10. John James Jacoby

    Out standing work Justin. Sucks the timing is off to not have you on board with bbPress, but you’ve got my word and support in incorporating things side by side, and I think that collaborating when we can is by far the best idea.

  11. Enk.

    Well, if WP Forums are gonna be rocking.. I’m sure there’s gonna be a bye-bye to Bulletin Boards. After all, We all love WP.

  12. Nico

    Really nice work and advanced use of post types and taxonomies.

    Can you explain how you handle relations between the 3 post types ?

    I have created a music site, and managed to “link” both artists and releases post types, with help of a custom taxonomy.

    How did you do it for the forum ?

    1. head

      Nico, if you want to handle multiple posts to posts relations you can use Posts 2 Posts plugin by scribu. I already use it on two sites…

      http://wordpress.org/extend/plugins/posts-to-posts/

  13. Pete

    Hi Justin I remember a while back I saw a plugin that used custom post types to make a type of forum thing… I’ll try to track it down for you (there was also a front end post plugin by the same author).

    Cheers Pete

    1. Pete

      Found it, it wasn’t a forum it is a classified ad plugin, nether the less it shows another real world example…
      http://wordpress.org/extend/plugins/your-classified-ads/

      Sorry if this link isn’t appropriate to post… just delete it if you like

  14. r-a-y

    Tadlock is as cool as Matlock! (well at least the theme tune!)

    Really need to beef up on my custom post types IQ, which currently is non-existent.

    Got a question. Not really a “how-did-you-build-it” question, but more of a “how-does-it-handle” question.

    I know you’re still working on optimizing the code, but how is performance (as I’ve noticed a bit of slow down when I’m on the PopCritics demo forum site)?

  15. Ryan

    I love the job you’ve done so far Justin.

    For editing, I see that there is a very slick AJAX editor which is accessed by double clicking the post – this is good.

    However there is also an “edit” button which yanks you away to a mysterious looking admin panel which doesn’t even slightly resemble the forum. To us WordPress users this feels normal, but to random outsiders this will seem a little weird. It would be best if the non-AJAX editing could be handled on the front-end as well, or if not, then the “edit” button should make use of the AJAX system instead so that users only get shoved off into the admin panel when they don’t have JS running.

    1. Grant Swaim

      The AJAX editor is the Front End Editor plug-in. You can see a topic that directly addresses your comment here:

      http://popcritics.com/forums/topics/commentsquestions-for-this-forum-design

  16. Ryan

    I tried breaking the forum by creating a giant super-sized post. It handled a fairly large one, but when it got too big, it simply reloaded the page I was in with no error message given. It might pay to serve an error in that situation so that the user knows what they did wrong.

  17. Ryan

    I’ve found what looks like a bug:
    http://popcritics.com/forums/topics/very-cool-forum-plugin#post-9865

    My URLs are getting screwed up when I put them inside IMG bbCode tags, whereas they work fine as tags.

  18. Ryan

    I found another bug, this time it’s with the [code] shortcode which is stripping out tags rather than converting them to entities as with most other fourm softwares. This was a bug in bbPress too and is a PITA for many forum users.
    http://popcritics.com/forums/topics/i#post-9866

    I can't find any way to delete my own post, but I have found a way to make it password protected. I assume that isn't a feature you had intended to add.
    http://popcritics.com/forums/topics/i#post-9869

    It is also possible to schedule posts for the future which I assume was not intended either:
    http://popcritics.com/forums/replies/9870

    If you use the search tool, it takes you to the individual post. However, 99.999% of the time people will be wanting to be taken to the anchor link within the topic. So the search tool needs to be adapted to search within a topic instead of using the_permalink() for the individual post. Should be fairly simple I imagine since you are using numbers for each post, just track down the topic, then use the number as the anchor link to target the correct part of the page ... actually, that might get more complex when taking pagination into account.

    Another suggest which you may have already thought of:
    Users may want to use a slug other than "forums", so a method to allow us to control that would be useful. Preferably via the admin panel.

  19. Jordan

    I actually just wrote a tutorial on how to integrate phpBB and Wordpress. Is this something you considered? Or did you want people to be able to use one login throughout the site?

    Link removed by administrator because of its irrelevancy to the topic at hand.

    1. Grant Swaim

      It looks like your article is about modifying a phpBB page to look like a WordPress page. This has very little to do with this project. You could even accomplish a single login with phpBB and WordPress by using yet another third party program, aMember, but this is not the simple solution to adding basic forum features to a WordPress site.

      Go back and read the post and I think you will see how integrating a third party forum does not meet the goals of this project.

  20. Cak Untung

    i just make a new blog, i am a newbie, could you help me how to make a comment form that i can reply my comment reader directly?

  21. Greg

    I just wanted to add a couple of notes on editor choices for the new forum plugin:

    In all the forums that I have investigated, WYSIWYG vs bbCodes is a debated topic, and sometimes the debate is hot. If you use the native WordPress editor with it’s WYSIWYG and shortcode capability, it is possible have best of both worlds, and not present the user with yet another editor.

    The built-in WP editor, with it’s ability to support attachments via the gallery, and to resize, thumbnail, crop, align, and caption images, is something that no forum software’s editor and attachment system does or does well. At least the one’s I’ve look at, which is many. The handling of hot linked images almost always has a different set a capabilities for floating, sizing, etc, than image attachments. This presents the user with a confusing inconsistency.

    WP’s augmentation of TinyMCE with regards to image handling is even better than any of the WYSIWYG editor demos I’ve seen, much less bbcode editors.

    To be sure, the full use of the internal editor would require some attention to security and permissions. When opening up posting to a larger audience as forums do, if HTML is optionally permitted via the WYSIWYG editor, it may be that WP’s filters would need to be supplemented by something like HTMLPurifier, HTMLawed, or Wibble.

    There are at least 2 ways that forum content itself is being integrated with the front end, and a forum plugin like yours has hugh potential here. (I’m sure you’re familiar with these).

    The first way forum content is integrated is designed to increase forum participation by leading users to the forum section to make comments on front-end articles. It is hoped that once in the forum pages, the user might become an active forum participant. Macrumors .com is one of the many sites that do this.

    The other way is designed to let the forums be a factory for front-end articles, with a “Promote to Article” link on the first post of a topic for admins and moderators with proper permissions. Invision Power and vBulletin are doing this.

    There are problems with the known implementations of these features — problems, it would seem, that this plug-in could avoid:

    1. If the article originated in the front-end and is moved to the forum for commenting purposes, then it is hard to translate into bbcodes. Which is one reason some forums have found it necessary to allow admins to post raw HTML. If the movement is in the other direction, and forum posters use bbcodes, it is very difficult to promote a topic to an article in such a way that it can then be edited with a WYSIWYG editor.

    2. The same users may be required to learn and use two different editors – one based on bbcodes and another WYSIWYG. For example, you may give your users their own blog with WP multisite, or let privileged user contribute directly. These same users my be forum contributors.

    3. When using the “promote topic to article” capability, the topic and all it’s attachments need to be copied to another post for front-end publishing, so that subsequent changes made by the original author can be re-approved. This is necessary if permissions don’t allow the original author to edit and publish his or her own promoted posts. Perhaps the admin-visible button on the topic could be changed from “Promote to Article” to “Update Promoted Article” or something like that. At any rate, this workflow issue would be much easier to solve if the forum post and the front end post both had the same kind of markup.

    In spite of testing several if not most of the popular forum systems, so far I have found no good solutions that would not require an extensive amount of coding to overcome the bbode-wysiwyg mismatch while providing adequate image and attachment handling. From the discussions I’ve seen in the various support forums, I know I’m not the only one. This plugin my be a huge step in the direction of providing this kind of really good integration.

    Thanks for listening, and I hope this adds to the discussion.

  22. Philippe Fenderson

    This is just beautiful. I cannot wait until there is some sort of testing phase, and I can get my hands dirty.

    The only thing I’m wondering is if there will be any amount of post synchronizing ability? The ability to have a post appear on the front page, as well as the forum, with one switch.
    Perhaps even syncing the comments as well?
    Just a thought. ;)

  23. Greg

    Just a clarification of my comment above. I meant the part about promoting a topic to an article to apply to the first post in a topic, and letting the subsequent posts be equivalent to comments. It gets messy quick if you start allowing any post in a topic to be promoted – it causes an overlapping of “comments.” Used this way, comments don’t need to be synced.

    You don’t even have to copy or sync to post of another type to promote it if you’re happy with the permissions – you can just mark it a as promoted to front page, promoted to section page, promote dto a “featured” carousel, etc, and perhaps denote an order.

    The editor rights could vary – guest comments can only use plain text or simple short codes, register members can use more codes, contributors can use the full WP built-in editor with image / gallery (attachment) capability, etc.

  24. shawn

    I was thinking about converting my vbulletin site over to a system just like this, using post-types in wp for my forums.

    One of my forums has millions of posts already. Exporting the data from vbulletin into a wp forum setup would be possible, but I’m curious what would happen to my wp site if I loaded millions of pages as a forum….

    Is wp going to puke all over itself if I try to do this?

  25. TheBigBoss

    Want this !! So cool !!

  26. Andrew

    Really amazing. The much awaited has finally arrived.

  27. Big News For bbPress Users: A bbPress Plugin is Coming to WordPress - WordPress MU and BuddyPress plugins, themes, support, tips and how to's

    [...] Justin Tadlock is also building a forum plugin for WordPress based on custom post types. He hopes to release a beta in the next month. In the near future [...]

  28. Andrew

    I’m looking forward to seeing this released as well. It does sound like a novel approach, and I was wondering whether something like this would appear with custom taxonomies.

    Not everyone needs, or wants, a full blown forum installation, and I think that this will be what people are looking for.

  29. Joel

    A couple of thoughts and a question:

    1) Optimize forum reply titles for SEO; currently a reply displays the post number and (I think) the title of the parent post, which is functional for site architecture, but it would be nice if the reply author could provide a custom title (with the parent post number appended) and it would potentially provide better search relevancy.

    2) Integrate akismet spam protection; not sure how this would work with posts instead of comments, but it sure would cut down on moderation time.

    3) What was the specific problem using comment functionality for replies, if you don’t mind?

  30. Erlend Sogge Heggen

    Arguably among the top 3 most important WordPress plugin developments of the decade!

    I appreciate and respect the way you approach this problem with regards to the ‘official’ bbPress plugin initiative.

  31. Grant Swaim

    When someone inquired on the bbPress forums how the new plug-in would handle editing, this is what Matt said:

    “Check out how P2 does front-end editor, it’s even slicker than bbPress. Actually check out a bunch of the features of P2 like the real-time post updating, etc.”

    You can watch a video here:
    http://p2theme.com/

    Working Demo here:
    http://p2demo.wordpress.com/

    Would it be prudent to take a look at this theme to see how this is done?

    Looks real slick…

    1. Darfuria

      Thanks for pointing this out. I agree. Implementing something like this would make for a beautiful forum plugin :-)

  32. tihiro hayasi

    Does using three post typesnumerous have numerous benefits ?
    Works well with plugins that allow you to edit from the front end of the site. That’s fantastic!

  33. Rich

    Have you seen Scott Clarks’ bbforum plugin? I haven’t tried it, but it looks similar and solid. It says it builds on the PODS CMS plugin, which creates custom content types.
    http://www.scottkclark.com/forums/bbforums/this-looks-like-bbpress-but-its-built-in-pods/
    The demo: http://www.scottkclark.com/forums/

    In case it gives you any ideas. I just heard about it.

    That said. I’m definitely looking forward to using your forum plugin b/c it’s comforting to know that I’ll be able to move to an official WP forum plugin–should it come along someday… Just what I’ve been waiting for!

  34. Darfuria

    I am very, very impressed, and cannot wait to see how this progresses. In honesty – it cannot come soon enough! I would be more than happy to donate to this project.

  35. Making a blog from your bookmarks « Tomcat23's Blog

    [...] from your bookmarks Justin Tadlock has a VERY interesting post about turning WordPress into a forum using custom post types. No downloadable code, but what he’s talking about here isn’t too hard to do. Another [...]

  36. Corpus

    I hope it will release as soon as possible. I wanna try that. It would be useful. Great Job….

  37. Rich (not the same Rich as the earlier post)

    Love the idea and given me some inspiration to try and develop something for the site.

    Will also be keeping an eye on the forum plugin as I think that could be really useful too. Some great work there Justin!

  38. Martin

    Good luck with this plugin Justin, the demo of this forum plugin in action at popcritics.com is looking sleek, and runs smooth!

    I love bbPress and have been using it for years, but I can’t wait around six or seven months again to see where the project is headed. I’m not saying bbPress isn’t going anywhere, but I had to make the decision to move forward on my own after the last disappointment.

    Couldn’t agree more, I like BBPress also but it’s moving forward at a very slow rate, it even has stalled a few times.

    Hopefully once the BBPress plugin is released more people will jump behind it and support it unlike the current BBPress forum software.

  39. biber hapı

    I hope it will release as soon as possible, I want to give a shot

  40. Calce

    Cannot wait to see the plugin in action!

  41. Rowan

    I am looking forward to seeing this plugin in action! It looks much simpler than PhpBB, which in my opinion is a good thing!

  42. dave

    looks really good Justin, can’t wait to get to try it on one of my sites. I’d taken to using Buddypress when i needed a forum, but it’s a bit overkill generally and doesn’t play well with themes out of the box.

    keep up the good work and thanks in advance!

  43. Karen

    Wow! I can’t wait to see this plugin released! I’d love to try this on my Wordpress-powered sites. Like Dave, I’ve also tried using Buddypress, but also experienced the same issue that it does not go well with some Wordpress themes.

    Thanks so much for working on this!

  44. Sumon

    Great Tips. Many many thanks to you for share this :)

  45. Rich

    Feature request: Option to use ‘started by’ instead of ‘latest poster’ column.

    BTW, any ETA for the plugin? A month, six months? I realize lots of testing still needs to be done.

  46. Russell Jamieson

    Hi Justin,

    Many thanks for your imminent contribution as a practical example of how to use custom post types and taxonomies. I have been following your various posts on the new features in Wordpress 3.0 with a lot of interest .

    I have a question regarding your design: why did you choose to create the Reply as a custom post type rather than just use comments?

    In my experiments with custom post types I took a slightly different approach of using comments for the replies. What additional features would I have if I were to migrate from my solution below to your new plugin?

    On the Slickr Flickr site I have built a Q&A Support system with a ‘Support’ custom post type with taxonomies for support_type (question, issue or suggestion) and support_status (new, open, closed, deferred, fixed) and using the built in feature of Wordpress comments for the dialogue between my customer and myself as the problem moves towards solution. The clients submit questions as comments as on the main page or via a form – if they are repeat questions I just reply and link to the correct topic and if they are valid new topics then I manually create the new ‘support’ custom post with a little bit of cut and paste and then link to this in the reply. This seems to work okay for me. So far the only code required was to register the custom post types and taxonomies and set up pretty links. Although I probably do need to add a widget to improve the searchability of the support request and make the support status more visible.

    Before I do any more work on this I wanted to understand if your solution would offer better capabilities to my customers and greater ease of use for me.

  47. Custom Post Types - Seeking impressive examples

    [...] on the forum he created using custom post types which is mind blowing when you see it in action: http://justintadlock.com/archives/20…tom-post-types I was thinking of creating a really simple directory style custom post implementation which would [...]

  48. James

    Hi Justin. I’ve been dying for a decent forum plugin for various sites for ages, and this looks like the perfect solution. Far too many are overcomplicated and frustrating for the end user, but this is just the ticket. I for one cannot wait for it to become available as a plugin!

  49. Hayley

    I’ve been trying to work out how to do an episode guide with custom post types, been banging my head against a wall when it came to dealing with seasons but your three post types approach has just resolved that for me, thanks! Now to figure the rest out.

  50. Wordpress Forum - Admin Extra Discussions

    [...] Wordpress Forum Just something I came across a few weeks ago, thought it might be worth posting here. Justin Tadlock is the guy that created the new 2010 Wordpress theme that comes standard with 3.0 He's created a working forum from the new post types introduced in 3.0 (yes, I know they were in 2.9 as well!). A WordPress forum plugin using custom post types [...]

  51. Allen

    Working on getting a site up for Scouting in the Florida Keys (keysscouts.org). I’ve started working on an ‘Event’ custom post type (CPT) and it seems to be doing well. Now I am starting a ‘Unit’ CPT and the though hit me that I could perceiveably do a ‘Leaders’ CPT and build links between them like I would a database so I wouldn’t have to duplicate data input. I’m new to behind the scenes work in php and wordpress. How difficult would it be to do this and can you point me to some good references?

    BTW- adding your feed to my reader. Great article and good references here! Thanks

  52. Rich

    One more WP forums plugin to check out if it helps spark ideas. http://cartpauj.com/projects/mingle-forum-plugin/

    I think it might actually be built on custom content types b/c it creates a new area in the admin like custom content types do. It looks nice enough with nice features–email notifications on replies, etc. Still would prefer to use yours though b/c I trust that your code will be clean as can be and supported into the future should we ever need to transition into a core plugin some year in the future, which are both very important to me.

    Would love to know what you think about it please.

    1. Rich

      Update: I asked the developer. His is not built on custom post types. It’s a fork of an old forum plugin.

  53. Kaj Rietberg

    Hi Justin,

    Looks very well but 1 question: why didn’t you use simplepress forum?

  54. Zeaks

    Looking forward to a release, nice work it looks great

  55. Jauhari

    WordPress Today and Beyond, Custom Post Type is wonderful way to enhanced WordPress

  56. Mark Morgan

    Could a similar approach be used to reply blog post comments with a custom post type? It really irks me that replies are a bit of a second class citizen in Wordpress. (I’m sure that’s unfair and there’s a good reason, but the idea does intrigue me.)

  57. Stefano

    Justin,
    a thing isn’t still clear to me is haw I can name different level of cust. post type in different way.
    I mean, the standard Post/Page have a child named Attachments, isn’t it?
    Now if I create a new hierachical “Lesson” post-type, how can I call it’s childs “Lesson content”? (it’s just and example)

    Stefano

  58. Claudia Webb

    WordPress rocks looking forward for A WordPress forum plugin… thanks for sharing :)

  59. Erlend Sogge Heggen

    If the bbPress plugin actually makes the deadline for its first public alpha release, due mid-September, don’t you think this project will be rendered somewhat redundant?

    Absolutely no offense intended; I was just of the understanding that part of your motivation for writing this plugin was because the official bbPress plugin seemed to be months away still. Seems not.

    So now, instead of providing a plugin-alternative to bbPress standalone while users are waiting for the official plugin, there’ll be two near identical forum plugins being developed almost in parallel, yet by different people. Maybe a collaboration would be worth reconsidering?

  60. Theo

    Just registered at Pop Critics, great ! I am looking forward to this plugin, thanks for the hard work.

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.