Please forgive me my ignorance – don’t worry we were all there when we started !!
bbpress uses the wordpress database and pages so is contained entirely within wordpress.
at it’s simplest, just put a ‘custom link’ menu entry of url ‘/fourms/’ and navigation label of ‘forums’ into your menu.
Alternately create a page with a title of say ‘forums’ and put [bbp-forum-index] in the content.
The client I’m working for would like logged in members to be able to create forums.
I’ve added the [bbp-forum-form] shortcode to the archive-forums.php template, and given the logged in user role the following permissions:
– edit_forums
– publish_forums
– delete_forums
However, when I login as a user in the above role, I get the “You cannot create new forums” message.
Any ideas what is happening here please?
bbpress is just a plugin that sits within wordpress, so you would just install it and typically have a menu entry to
yoursite.com/forums
see
Step by step guide to setting up a bbPress forum – Part 1
yes, in effect create the subdomain you say, and install wordpress and bbpress.
Then you could just have a home page with the code [bbp-forum-index] in it and that is all that site would contain
this is a theme conflict issue, and you need to get your theme to recognise bbpress.
Not bbpress’s fault and not your theme’s fault, both just use wordpress
see
Step by step guide to setting up a bbPress forum – Part 1
section 8 on trying to get them to work together
Haha. This is amazing. I added the code to my php and it worked. Thanks a million. Some other experts couldn’t help me with this.
Robin, two more questions. Related.
Can you also tell me how I as administrator get all forums in a alphabetical order, but my students/members not? It’s totally random? How can I fix that? I think the most recent one is on top. How can I change that? I can’t seem to change to date of publication.
And how can I get notified when some starts topic in a forum. I tried the plugin bbPress Notify Admin, but it didn’t work. Perhaps I didn’t follow the instructions correctly.
Any help would be great. Let’s make this 3 out of 3 😉
Gijs (Holland)
small tweak to not break for users with names that include spaces. the issue was not a permissions one as i posted above.
/*
* attempt to handle generic request for current user
* https://bbpress.org/forums/topic/how-do-i-link-to-profile-page/
*
* if the url is passed as forums/users/current/
* this function detects that the permalink has been set to bbp_user=current
* and
* - if the user is logged on, the query is changed to the current user
* - if the user is not logged on, the user is redirected to login screen
*
*/
function ink_bbp_request_current_user( $query_vars ) {
if ( isset( $query_vars[ 'bbp_user' ] ) ) {
switch ( $query_vars[ 'bbp_user' ] ) {
case 'current':
if ( get_current_user_id() ) {
$query_vars[ 'bbp_user' ] = bbp_get_user_nicename(get_current_user_id());
} else {
auth_redirect();
}
}
}
return $query_vars;
}
add_filter( 'bbp_request', 'ink_bbp_request_current_user', 10, 1 );
@jonathanmoorebcs for me, your code works great for admin users, but fails for contributor role users
Hey guys
This is probably due to my theme, but the default install of the forum at the url /forums displays the forum on a page with the title “Archives” and the layout is broken, ugly, full width etc.

Following another suggestion on this forum, I created a forum holding page at the url /forum and used the shortcode [bbp-forum-index] to embed the forum in this page, and it looks great.

However, when any forum link is clicked, you’re taken to a page with the starting slug of /forums and the ugly layout again. How do I keep the forum within the nice page layout?
In the Settings I have:
Forum root: forums
Forum prefix: unchecked
Forum root should show: Forum Index
Single forum slugs / Forum: forum
If I change the forum root to /forum that overrides the custom page I set up and I’m back to the ugly layout again.
What’s the best way around this?
Many thanks in advance.
I suspect it’s related to your theme, but all I’m seeing on that link is a buddypress page.
you can try this in your theme’s custom css, but I feel it is more related to the theme selections you are using
.g-cols .l-content {
width: 100% !important;
}
<a href="http://yoursite.com/forums">Words Here</a>
in custom html widget
Thank you. that was a lot of information but my problem is much simpler. I already created a forum and so far everything is satisfactory. I was even given a shortcode(i promptly disregard)because i thought it would be simple.
My only problem is i am unable to access(a link perhaps) it from my website home page. All i need is a link on the sidebar or on a menu that says “Go to Forum” or anything. Don’t think it is difficult but i just cant do it nor have the time to up on support. I could definitely use some quick help. Thanks
Hi all
i already created a forum(I was given a shortcode but i lost it) in any case i do not know how to use it to put a forum link on my home page. Help please!
by the way, the first bit of code saves the changes to the database, so just removing the code does not remove the capability.
to undo this, you would need to re-run the first function, but with all the add_cap changed to 'remove_cap'
editing users is a wordpress rather than bbpress function
It may well be possible, but the easier way would be to use a wordpress role to do this.
This link will give you code to make the ‘editor’ role able to do user stuff, and you may want to hide admins as per their suggestions
Let Editor Manage Users in WordPress
so you would just set your moderators to be editor as well as moderator
I will need to spend long periods of time away from my site and bbpress forum, and want the Moderators to have the ability to delete users that are clearly just there to spam. I want them to have more than blocking capability and the ability to delete posts and topics.
I have not found much on this topic through searching. I am willing to implement some specific code. If there is something I can edit with Buddypress to allow this, please let me know. However, I don’t want to make the moderators Keymasters – I only want them to have authority over the forums and who uses them.
I would rather use code than a plugin. Not sure if it is simple as adding a line to the bbpress moderator capabilities that allows them to essentially ban Buddypress users.
WordPress version: 5.2.3 (Vantage theme)
bbPress version: 2.5.14
Site: https://pirateswithben.com/forums/forum/pirates-csg/
Thank you!
Ben
Back to square one. I have tried everything I can think of. I have looked at several articles here, copied and pasted lots of CSS codes, tried everything I can think ok. Need some help please. Thank you.
here you go – http://www.livingdipfree.com
I did plug in a CSS code and it got better – not fixed, but better.
thanks for the update
essentially that part of the code is looking at urls, so that would make some sense
it is this code returning ‘false’ that causes the error you see
function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
/** Home URL **************************************************************/
// Parse home_url() into pieces to remove query-strings, strange characters,
// and other funny things that plugins might to do to it.
$parsed_home = parse_url( home_url( '/', ( is_ssl() ? 'https' : 'http' ) ) );
// Maybe include the port, if it's included
if ( isset( $parsed_home['port'] ) ) {
$parsed_host = $parsed_home['host'] . ':' . $parsed_home['port'];
} else {
$parsed_host = $parsed_home['host'];
}
// Set the home URL for use in comparisons
$home_url = trim( strtolower( $parsed_home['scheme'] . '://' . $parsed_host . $parsed_home['path'] ), '/' );
/** Requested URL *********************************************************/
// Maybe include the port, if it's included in home_url()
if ( isset( $parsed_home['port'] ) ) {
$request_host = $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'];
} else {
$request_host = $_SERVER['HTTP_HOST'];
}
// Build the currently requested URL
$scheme = is_ssl() ? 'https://' : 'http://';
$requested_url = strtolower( $scheme . $request_host . $_SERVER['REQUEST_URI'] );
/** Look for match ********************************************************/
// Filter the requested URL, for configurations like reverse proxying
$matched_url = apply_filters( 'bbp_verify_nonce_request_url', $requested_url );
// Check the nonce
$result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;
// Nonce check failed
if ( empty( $result ) || empty( $action ) || ( strpos( $matched_url, $home_url ) !== 0 ) ) {
$result = false;
}
// Do extra things
do_action( 'bbp_verify_nonce_request', $action, $result );
return $result;
}
perhaps I over thought this. I tried this below
$this->field_map[] = array(
'from_tablename' => 'messagebodies',
'from_fieldname' => 'msgid',
'join_tablename' => 'messages',
'join_type' => 'LEFT',
'join_expression' => 'USING messagebodies.msgid = messages.msgid AND messagebodies.forumid = messages.forumid',
'from_expression' => 'WHERE messages.msgid = 0',
'to_type' => 'topic'
however I cannot know if this is proper because I am getting an error that seems to point to the base converter logic for “topic” the to_type here of topic should refer to the destination table right?
I’m setting up the importer using the example but I’m a little stuck doing the joins. This is a little advanced for me because it seems to me that I need to join 3 tables and a total of 3 fields to match from the origin forum which has each post separated in two separate tables and those tables reference the forumID in a third table.
so the example code for topics is:
`// Setup any table joins needed for the topic section
$this->field_map[] = array(
‘from_tablename’ => ‘replies_table’,
‘from_fieldname’ => ‘the_topic_id’,
‘join_tablename’ => ‘topics_table’,
‘join_type’ => ‘INNER’,
‘join_expression’ => ‘USING replies_table.the_topic_id = topics_table.the_topic_id’,
‘from_expression’ => ‘WHERE forums_table.the_topic_id = 0’,
‘to_type’ => ‘topic’
);`
in my source forum tables that are being imported from, it is broken down into four tables:
forums.forumid, forums.categoryid
categories.categoryid
messages.msgid, messages.forumid, messages.threadid, messages.subject
messagebodies.msgid, messagebodies.forumid, messagebodies.bodytext
I believe that I can ignore the category to get what is needed but that is still three tables. the threadID is sequential and relative to each forum so there is a thread 1 in forum1 and and thread1 in forum2 and all other forums. So the forum ID has to be referenced in the third table (forums)
I am thinking this is a “LEFT” with and conditions is that right? can someone get me started with an example? Thank you.
Anonymous User 17557030Inactive
Hi there,
I’m a fresh out of water BBPress user and I have never coded in my life 🙂
We have just set up a BBPress forum on our WordPress website and we are looking into changing what is displayed in the profile section. At the moment it’s Forum Role, Topics Started and Replies Created.
I would like to create custom fields like Company, Job Title, Area, Email, Phone Number and Website to be displayed there.
First of all, I would need to add these sections in Profile Edit tab. Secondly, find a way to display them on the Profile page.
I have to mention, I have found a way to remove Forum Role, Topics Started and Replies Created by editing plugin file bbpress/templates/default/bbpress/user-profile.php
Also, I have just noticed that when you visit somebody’s profile page, his name is not displayed there, which would be something i would like to be displayed as well 🙂
Have anyone managed to do things mentioned above, and would be willing to share with the class? 🙂
Many thanks,
Dominik
WORDPRESS VERSION [Last checked on September 18, 2019 at 9:48 am. Check Again
You have the latest version of WordPress. Future security updates will be applied automatically.]
BBPRESS VERSION: 2.5.14
TWENTYNINETEEN
home
I am using the bbpress [forum] plugin.
I do not want to use it in its default state. I want to have it maintain my site’s design.
According to what I have read [HERE; https://codex.bbpress.org/themes/theme-compatibility/ ]
to do so requires me to copy both the bbpress and the css directories
from the default folder and paste it or upload
it into the ‘theme’ directory/ folder.
Thing is I am not quite sure if I ought to paste them [ bbpress & css directories] into the wp-config.php folder
& if so where [in the wp-config.php folder] ? Is it Before or after the present info I see there now?