Arrange BBpress topics by created

Add this to a plugin or your active themes functions.php function my_custom_display_topic_index_query () { $args[‘orderby’] = ‘date’; $args[‘order’] = ‘DESC’; return $args; } add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

bbPress or WordPress + forum plugin?

I have used http://simple-press.com/ on a few WordPress sites I have done and its been really good and I haven’t had any problems with it. Alot of options, quite robust yet easy to use, it would be the one I would suggest trying.

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)