If post type = forum then breadcrumbs Home > Forums

I managed to fix this by: <?php function the_breadcrumb() { global $post; $post_type = $post->post_type; echo ‘<ul id=”breadcrumbs”>’; if(get_post_type() == ‘forum’ OR get_post_type() == ‘topic’ OR get_post_type() == ‘reply’) { echo ‘<li><a href=”‘; echo get_option(‘home’); echo ‘”>’; echo ‘<i class=”ts-awesome-home” style=”font-size:14px;letter-spacing: 2px;”></i> Home’; echo ‘</a></li><li class=”separator”> / </li>’; echo ‘<a href=”https://link”>Forum</a>’; echo ‘ &nbsp;/&nbsp; ‘; … Read more

Add QuickTag in bbpress replies

SOLVED! I just put anther add_action to insert the javascript in the rest of the theme (and for bbpress too): add_action( ‘wp_print_footer_scripts’, ‘generico_quicktags’ ); The quicktags check in function already prevents wordpress to put the javascript in unwanted places!

Get rid of the word private in bbpress forums names

AFAIR BBPress relies on WP functions with these titles, so most probably this will be helpful: function remove_private_prefix_from_title( $title ) { return ‘%s’; } add_filter( ‘private_title_format’, ‘remove_private_prefix_from_title’ ); And here you can find docs for that filter: private_title_format

what is the topic-view page’s name? in bbpress

This will depend on your theme. But for the templates that come with the BBPress plug-in, the single topic template page is singe-topic.php. This in-turn doesn’t do much, but call content-single-topic.php. This displays stuff like the password form for protected topics, displays topic description etc. and then loops through the replies to the topic with … Read more

Change the avatar ratio in bbPress login widget

You can filter ‘get_avatar’: add_filter( ‘get_avatar’, ‘wpse_67657_new_avatar’, 10, 5 ); function wpse_67657_new_avatar( $avatar, $id_or_email, $size, $default, $alt ) { // create a new img element or … $new = str_replace( ‘s=40’, ‘s=80’, $avatar ); $new = str_replace( ‘avatar-40’, ‘avatar-80’, $new ); $new = str_replace( ” height=”40″ width=”40″”, ” height=”80″ width=”80″”, $new ); return $new; } … Read more

pre_get_posts and BBPress in Swagger Theme

I’m not 100% clear on what the problem is, but I would start with putting the conditions inside the function instead of wrapping the entire function. add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if (!is_admin()){ global $oswcPostTypes; if(empty( get_query_var(‘suppress_filters’ ) ) { $post_type = get_query_var(‘post_type’); //get theme options global $oswc_reviews; if($post_type ) { $post_type = $post_type; set_query_var(‘post_type’,$post_type); … Read more