Private BBpress messages made simple



I have a recurring problem: whenever I respond to messages from my support forum, I realize that I have to request access to the WordPress administration console to make some minor changes. But all tickets are public, and obviously I can’t ask my users to enter confidential data in their tickets. Sometimes i ask them tu use my contact form but to be honest, this is not a good solution because often I don’t link the message I get to the ticket on the forum.

Private BBpress messages

So I was inspired by an article by Pippin Williamson to create a simple and effective system which allows forum users to enter data that only administrators can see. To achieve this, I simply added a function that allows bbPress to use shortcodes in forum posts content. Then i created a second function that adds a new shortcode. This simple is very basic but works well.


So, basically, when a forum user enters a message between [ private ] brackets and posts its ticket here is what everyone sees:

[alert type=”warning”]This content is private[/alert]

and here is what administrators see:

[alert type=”notice”]Here is the private content (only admins see this message)[/alert]

Pretty nice isn’t it?


Here is the code to do this, just place it in your functions.php or inside a custom plugin:

3 responses to “Private BBpress messages made simple”

  1. This is sweet and actually right along the same lines of something I’ve been meaning to work on: ability to mark replies as private.

    The short code method works really well but it’d be even better if the user simply had a checkbox to click. How do you feel about collaborating with me to build it? ;)

    1. Yeah for sure! This is something i’ve been looking for over the internet but nothing really interesting. So, yes let’s do it !

  2. […] 이 글에 나와 있는 코드를 사용하면 [private]…[/private] 숏코드를 사용하여 일반 사용자가 관리자만 볼 수 있는 메시지를 전달할 수 있습니다. 즉, 토픽이나 답변에서 글 중간에 비밀번호나 민감한 내용을 private 숏코드로 관리자만 볼 수 있도록 할 수 있습니다. […]

Leave a Reply