How to change role titles in Bbpress?

Have you tried this plugin: http://wordpress.org/extend/plugins/bbpress-string-swap/ ? Or if you want to code, you could use this snippet in which you can change names. You should insert it into your functions.php 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’ => __( ‘Keymaster’, ‘bbpress’ ), ‘capabilities’ => bbp_get_caps_for_role( bbp_get_keymaster_role() ) ), … Read more

How to get the Role Name of the current user? (WordPress)

I’m not sure if bbPress follows WordPress conventions, but WP has a global class called $WP-roles that holds the role information. So, starting from what you have, there is the role of the current user: $current_role = $user->roles[1]; Next, retrieve a list of all roles: $all_roles = $wp_roles->roles; Then, loop through $all_roles and find the … Read more

How to create a custom nested loop in bbPress (WordPress + bbPress plugin)

bbpress has its own query class called BB_Query() and it accepts: $ints = array( ‘page’, // Defaults to global or number in URI ‘per_page’, // Defaults to page_topics ‘tag_id’, // one tag ID ‘favorites’ // one user ID ); $parse_ints = array( // Both ‘post_id’, ‘topic_id’, ‘forum_id’, // Topics ‘topic_author_id’, ‘post_count’, ‘tag_count’, // Posts ‘post_author_id’, … Read more

How can I pass a variable to wp_ajax action?

You’d need to put the variable’s value onto the page so that javascript can pass it back to PHP using ajax. Ajax functions are a completely separate “page load” so even if you made it global it won’t work. The best way to do this is using “wp_localize_script” (https://codex.wordpress.org/Function_Reference/wp_localize_script) Here’s an full example of how … Read more

How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]

I have found the answer for myself actually. Yes, I love the fact that bbPress is not obtrusive! It almost doesn’t matter at all how I am trying integrate BuddyPress here. So this narrow downs to customise bbPress template when installed as a plugin to WordPress. The answer is here: http://codex.bbpress.org/legacy/step-by-step-guide-to-creating-a-custom-bbpress-theme/ Thanks for Zaerl on … Read more

how to redirect to a custom password retrieval page

not sure i really follow you either, BUT what about filtering the wp_lostpassword_url from wp-includes/general-template.php function wp_lostpassword_url( $redirect=”” ) { $args = array( ‘action’ => ‘lostpassword’ ); if ( !empty($redirect) ) { $args[‘redirect_to’] = $redirect; } $lostpassword_url = add_query_arg( $args, network_site_url(‘wp-login.php’, ‘login’) ); return apply_filters( ‘lostpassword_url’, $lostpassword_url, $redirect ); } looks like it has a … Read more

How do I set up real anonymous posting in bbpress forums? [closed]

When we post an empty anonymous reply, we get the following errors: The part of BBPress that’s responsible for handling this, is the bbp_new_reply_handler() function, in the file /bbpress/includes/replies/functions.php. It contains these lines that are of interest to us: // User is anonymous if ( bbp_is_anonymous() ) { // Filter anonymous data $anonymous_data = bbp_filter_anonymous_post_data(); … Read more

How to change the text of link ‘Home’ in bbPress forum breadcrumb?

The string is now in bbpress/includes/common/template-tags.php. Hook into bbp_no_breadcrumb, register a filter for gettext and change the text: add_filter( ‘bbp_no_breadcrumb’, ‘wpse_44597_change_home_text’ ); function wpse_44597_change_home_text( $translated, $original=””, $domain = ” ) { if ( ‘bbp_no_breadcrumb’ === current_filter() ) { add_filter( ‘gettext’, __FUNCTION__, 10, 3 ); return FALSE; } if ( ‘Home’ === $original && ‘bbpress’ === … Read more

How to edit posts with the new wp_editor api?

For the sake of completeness, I am going to post an answer based on the solution you edited in your question. $post = get_post( $post_id, ‘OBJECT’ ); wp_editor( esc_html( $post->post_content ), ‘textarea01’, $settings ); This would escape the HTML too so if you are editing a post you might want to replace the last line … Read more