WordPress 5.7.2
BBPress 2.6.6
Any help would be greatly appreciated!! I am at my wits end trying to figure this out….
I would like to get people automatically redirected to a page inside the forum instead of the WP dashboard, but it is not working. Here is what I have done so far:
1. After they are accepted into the program, they are sent to our register page: https://arianegoodwin.com/curiosity-cocktails-register-here/
2. I did figure out redirect code for after they register so they see this page:
Log In
(this is the code snippet I used for this):
// Redirect Registration Page
function my_registration_page_redirect()
{
global $pagenow;
// Standard Registration Redirect
if ( (strtolower($pagenow) == ‘wp-login.php’) && (strtolower($_GET[‘action’]) == ‘register’) ) {
wp_redirect( home_url(‘/register/’) );
}
// Redirection after successful registration
if ( (strtolower($pagenow) == ‘wp-login.php’) && (strtolower($_GET[‘checkemail’]) == ‘registered’) ) {
wp_redirect( home_url(‘/forums/log-in/’) );
}
}
add_filter( ‘init’, ‘my_registration_page_redirect’ );
3. After they click on the link in their email to create their password, they are getting sent to the WP Dashboard and I need them to go to this page instead:
Curiosity Cocktails Topic Map
I have tried using Peters Login Redirect and that has not worked. I have also tried using this code inside the Snippets, which isn’t working either:
// Send new users to a special page
function redirectOnFirstLogin( $custom_redirect_to, $redirect_to, $requested_redirect_to, $user )
{
// URL to redirect to
$redirect_url = ‘https://arianegoodwin.com/forums/curiosity-cocktails-topic-map/’;
// How many times to redirect the user
$num_redirects = 1;
// If implementing this on an existing site, this is here so that existing users don’t suddenly get the “first login” treatment
// On a new site, you might remove this setting and the associated check
// Alternative approach: run a script to assign the “already redirected” property to all existing users
// Alternative approach: use a date-based check so that all registered users before a certain date are ignored
// 172800 seconds = 48 hours
$message_period = 172800;
/*
Cookie-based solution: captures users who registered within the last n hours
The reason to set it as “last n hours” is so that if a user clears their cookies or logs in with a different browser,
they don’t get this same redirect treatment long after they’re already a registered user
*/
/*
$key_name = ‘redirect_on_first_login_’ . $user->ID;
if( strtotime( $user->user_registered ) > ( time() – $message_period )
&& ( !isset( $_COOKIE[$key_name] ) || intval( $_COOKIE[$key_name] ) < $num_redirects )
)
{
if( isset( $_COOKIE[$key_name] ) )
{
$num_redirects = intval( $_COOKIE[$key_name] ) + 1;
}
setcookie( $key_name, $num_redirects, time() + $message_period, COOKIEPATH, COOKIE_DOMAIN );
return $redirect_url;
}
*/
/*
User meta value-based solution, stored in the database
*/
$key_name = ‘redirect_on_first_login’;
// Third parameter ensures that the result is a string
$current_redirect_value = get_user_meta( $user->ID, $key_name, true );
if( strtotime( $user->user_registered ) > ( time() – $message_period )
&& ( ” == $current_redirect_value || intval( $current_redirect_value ) < $num_redirects )
)
{
if( ” != $current_redirect_value )
{
$num_redirects = intval( $current_redirect_value ) + 1;
}
update_user_meta( $user->ID, $key_name, $num_redirects );
return $redirect_url;
}
else
{
return $custom_redirect_to;
}
}
add_filter( ‘rul_before_user’, ‘redirectOnFirstLogin’, 10, 4 );
I have my reply form at the top of my page rather than the bottom and when I click “cancel” on a reply to a comment, the reply form goes back to its default position (the bottom of the page). Is there a way I can change this so after I click the cancel button it goes back to the top?
I have looked through my theme to see if it was a theme problem but can’t seem to find where this happens. The class of the button is ‘bbp-cancel-reply-to-link’ if that helps.
Thanks
Hello.
So i’m developing a tech website but for some reason i can’t make the created forum roles to appear on users.
Roles Created:
Member – Participant rules but can’t create topics, only reply to existent ones.
GCam Dev – with same permissions as Member but can create threads.
ROM Dev – with same permissions as Member but can create threads.
Kernel Dev – with same permissions as Member but can create threads.
Modder – with same permissions as Member but can create threads.
I’ve been searching and used this code below for it:
//code to add tutor role
function add_new_roles( $bbp_roles )
{
$bbp_roles['bbp_gcamdev'] = array(
'name' => 'GCam Developer',
'capabilities' => custom_capabilities( 'bbp_gcamdev' )
);
$bbp_roles['bbp_romdev'] = array(
'name' => 'ROM Developer',
'capabilities' => custom_capabilities( 'bbp_romdev' )
);
$bbp_roles['bbp_kerneldev'] = array(
'name' => 'Kernel Developer',
'capabilities' => custom_capabilities( 'bbp_kerneldev' )
);
$bbp_roles['bbp_modder'] = array(
'name' => 'Modder',
'capabilities' => custom_capabilities( 'bbp_modder' )
);
$bbp_roles['bbp_member'] = array(
'name' => 'Member',
'capabilities' => custom_capabilities( 'bbp_member' )
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 );
function add_role_caps_filter( $caps, $role )
{
/* Only filter for roles we are interested in! */
if( $role == 'bbp_gcamdev' )
$caps = custom_capabilities( $role );
if( $role == 'bbp_romdev' )
$caps = custom_capabilities( $role );
if( $role == 'bbp_kerneldev' )
$caps = custom_capabilities( $role );
if( $role == 'bbp_modder' )
$caps = custom_capabilities( $role );
if( $role == 'bbp_member' )
$caps = custom_capabilities( $role );
return $caps;
}
add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
function custom_capabilities( $role )
{
switch ( $role )
{
case 'bbp_gcamdev':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
case 'bbp_romdev':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
case 'bbp_kerneldev':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
case 'bbp_modder':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
case 'bbp_member':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => false,
'edit_topics' => false,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
break;
default :
return $role;
}
}
The Forum Roles appear on the Users menu but when i select it and Save Changes the role is removed. Am i missing anything?
Dear community,
if I want to delete a topic or a post by clicking on “Recycle Bin”, it is no longer possible to restore the topic/post because the “marked” object has already been removed from the database.
If I click on “Delete” again, the page is reloaded and I see all the topics that I had deleted. After reloading the page, these posts have disappeared.
I use the bbpress version 2.6.6. The wordpress version is 5.7.2. I am using the Avada theme. The forum is password secured, so it is not possible for me to share a link here.
Thank your very much if you know how to fix this issue.
Kind regards
Marco
I’m wanting to create conditional logic that responds to whether a user is logged in to bbpress.
Googling helped me to find these two functions:
bb_current_user_can()
bb_is_user_logged_in()
However, when I use them, I get the error “Call to undefined function bb)…”.
This happens even when I tie my containing function to the hook ‘plugins_loaded’, which I believe fires after all activated plugins have loaded.
(I first tried to use the hook ‘wp’)
So I’m just double-checking…
Should I be able to use either of those two functions to test if a user requesting a resource is a logged-in bbpress user?
I’m not sure if this is an issue with bbPress or BuddyPress; forgive me if I’m posting this in the wrong place. I recently added BuddyPress to my installation which already had bbPress, and I see that when a BuddyPress group has a forum, it’s added to the list of forums like the bbPress ones. Awesome!
However, if I change the description of the BuddyPress group, the bbPress forum list still shows the old description. If I go to Forums > All Forums, I can edit the description which updates the description on the forums list. Is this a bug, or are you supposed to have to update it in two places? Is it allowing for some users to have a different description in bbPress vs BuddyPress?
bbPress: 2.6.6
BuddyPress: 8.0.0
Wordpress: 5.7.2
Site (though most of the forums are private): https://antiochfc.org/forums
I am running BBpress with the Highend theme. I have set up the forums and they look great, but the “subscribe” button is missing. “Allow users to subscribe to forums and topics” is checked in the settings. I assume it’s a theme conflict, but without the forum subscribe button, the functionality for our users is crippled. Is there any way to correct this? Thanks!
WordPress 5.7.2
bbpress 2.6.6
https://zencenterofdenver.org/forums/
Would one of you pros please let me know what template page is used when a topic is opened in a forum?
I went through almost all of them trying to figure this out.
Thank you in advance.
I’ve done something, but I don’t know what? I think the slugs for the ‘forum’ page may have had a conflict (there was a warning message, but I changed the names), and I think the tabs went missing after I rebuilt the tables, but the tabs have totally disappeared now, and I don’t know how to get them back. Its a backend issue, as its not affecting the front end – you can still get to the forum page
I uninstalled and deleted/reinstalled bbpress, and it hasn’t brought the tabs back.
I’m really worried that if I delete the Buddypress plugin, I will lose my settings and customer lists of Participants. Any advice would be very much appreciated.
bbPress Version 2.6.6
Buddypress Version 8.0.0
Wordpress the latest
FORUM HERE
I have a forum, when creating a topic, no tag appears, I have to write a tag. What I want is that when creating a topic, there are tags determined by me for users to choose! I even downloaded the bbp style pack plugin, went to dashboard>settings>bbp style pack>Topic/Reply Form and checked option 18, even though I created tags in dashboard>topic>tagtopic when I create a topic, none appears tag for me to choose