Search Results for 'code'
-
Search Results
-
Topic: Error message after install
I’ve installed bbpress, but when I go to the forum in a browser, I just get this message:
Fatal error: Class 'WP_Post' not found in /nfs/c09/h02/mnt/137912/domains/profoodblogger.com/html/wp-content/plugins/bbpress/includes/core/theme-compat.php on line 375How can I begin tracking this down?
Topic: Change user role text color
So I changed the names of the user roles. I would like to change the text color of each role. Here is the code that I am using to change the name. Could I just wrap the role name in a color code?
add_filter( 'bbp_get_dynamic_roles', 'my_bbp_custom_role_names'); function my_bbp_custom_role_names(){ return array( // Keymaster bbp_get_keymaster_role() => array( 'name' => __( 'The Dragon Born', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) ), // Moderator bbp_get_moderator_role() => array( 'name' => __( 'Moderator', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) ), // Participant bbp_get_participant_role() => array( 'name' => __( 'Legionnaire', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) ), // Spectator bbp_get_spectator_role() => array( 'name' => __( 'Spectator', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() ) ), // Blocked bbp_get_blocked_role() => array( 'name' => __( 'Blocked', 'bbpress' ), 'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() ) ) ); }p.s. Is there a way to change what each of these roles have access to?
Hi there,
I’ve spent a while searching the forums/web regarding custom views, but am a little bit stumped at the moment. Some of the only reference that I’ve found is a bit outdated (though it still seems to work) and incomplete.
I’d like to create 2 custom views:
- Display a particular user’s favorites (let’s say user_id is hard-coded to 2)
- Display a particular user’s subscribed topics (again, let’s say user_id is hard-coded to 2)
Any points in the right direction? Ideas for resources on the topic of custom views?
Hi there,
I’m working with a custom profile setup (consolidating the profiles from multiple plugins) and and wondering how I can redirect a bbpress user to this central profile when they try to access their forum profile. In other words, how do I make it so that someone who tries to visit:
http://www.example.com/forums/user/johnsmith
is redirected to:
http://www.example.com/profile
I saw a very old post in this forum that discussed this topic, and they suggested using the following method:
add_action('bb_init', 'profile_redirect'); function profile_redirect() { if (is_bb_profile() && $_GET['tab'] != 'edit' && $_GET['tab'] != 'favorites') { $user = bb_get_user($_GET['id']); if ($user) wp_redirect("http://www.example.com/member/" . $user->user_nicename); } }Since it’s so old, it doesn’t work anymore, and honestly, what I’d like to do is slightly different. I’d like to redirect a user away from the profile page (regardless of which section they’re on–whether it be favorites, subscriptions, or edit profile) as long as:
- They are logged in
- They are on their ownprofile page
How could I do that with the current version of WordPress?