Is there any code highlighter that works from the front end on forums (bbpress). I have installed a couple but they only work for the admin from within “Posts”. I cannot access the same functionality form creating forum posts or replying to forum post from the front end.
If you arrived here from a search for “bbpress breadcrumbs missing” like I did…
turn off Yoast’s breadcrumbs at:
/wp-admin/admin.php?page=wpseo_titles#top#breadcrumbs
Maybe you don’t have those selectors / class names on your theme? Not sure what theme you’re using, but when I test on this forum, in Chrome & Safari adding the above fixes the overflow issue, Firefox didn’t seem to have a issue.
Try the below, you might have to refresh your browser so it loads the changes.
.bbp-reply-content a,
.bbp-topic-content a{
word-wrap: break-word;
word-break: break-word;
}
same question. Can we put in a standard bold, italic underline toolset, and not shot enduser code at all?
Neither one of the 2 things. Without plugins forum page is empty. More I’ve tried to add an image with this bbp code into same the page, the page is blank.
Hi there,
Is there a shortcode that displays a list with links to all forums?
Also, is there a shortcode that will display the number of threads? I’m wanting to create a list of links to my forums and also display the number of threads/posts next to each link.
Thanks!
In my site only [bbp-topic-index] code not working, register and login code work in the pages.
I use Generatepress theme if this could be the problem. It is someone to help me, please?
My site: https://firsttelling.com
Thank you
Mircea
So I just Installed bbPress for my first time because I want to create my little forum.
I’ve been using wordpress for a while and I’m in love with it.
Now bbpress, for what I see comes default or similar to the Theme from what I read.
this is currently how it looks The picture of my forum site
So my questions is there any good plugins out there to really design the buttons like the search button or the log out and the bbPress forum itself?
Or I mustly need to do this manually by editing code and css?
I’m really noob, I learend a little bit html,css but no more then that, any help will be very respected <3
so what shortcodes has it got ?
is this an actual WordPress page with shortcodes in it?
Hi there,
Is there a simple PHP code snippet that will display the number of new posts/threads a user has after the logo in? I’m looking to add a simple text displaying these figures after a user logs in?
If there is a snippet available, that would be great!
Thanks
Put this in your child theme’s function file – or use
Code Snippets
add_filter( 'ngettext', 'rew_bbpress_translate' , 20 , 5 );
function rew_bbpress_translate( $translation, $single, $plural, $number, $domain ) {
if ($domain == 'bbpress') {
if ($translation == 'Viewing %1$s topic') $translation = 'Viewing %1$s messages' ;
if ($translation == 'Viewing %1$s topics') $translation = 'Viewing %1$s messages' ;
if ($translation == 'Viewing topic %2$s (of %4$s total)') $translation = 'Viewing message %2$s (of %4$s total)' ;
if ($translation == 'Viewing %1$s topics - %2$s through %3$s (of %4$s total)') $translation = 'Viewing %1$s messages - %2$s through %3$s (of %4$s total)' ;
}
return apply_filters ('rew_bbpress_translate', $translation, $single, $plural, $number, $domain ) ;
}
Thank you, I have created a new page and a new template and now added in the shortcode via PHP:
<?php
/* Template Name: HOMEPAGE */
/**
* The template for displaying 404 pages (not found)
*
* @package olympus
*/
get_header(); ?>
<?php echo do_shortcode("[bbp-forum-index]"); ?>
Thanks again
create a homepage called anything you like.
then put this shortcode in it
[bbp-forum-index]
@sirlouen – thanks, I’ve incorporated all those changes in 4.4.2
Let me know if I missed anything
and thanks so much for helping me improve my plugin – as a one man developer/tester it’s hard to spot where code can be improved !
Also, I’m not sure if this is intended but similarly to the other elements this last two don’t have their “show-icon” class with
font-family: 'dashicons';
content: '\f155';
and
font-family: 'dashicons';
content: '\f147';
But could be included with this CSS code (I’ve included in my custom anyway but just to get the same format)
.sidebar .bsp-st-info-list li.topic-favorite:before {
font-family: 'dashicons';
content: '\f155';
}
.sidebar .bsp-st-info-list li.topic-subscribe:before, .sidebar .bsp-sf-info-list li.forum-subscribe:before {
font-family: 'dashicons';
content: '\f147';
}
About the other topic here the two snippets (I’m copying a little in the top and in the bottom:
Around 555
<?php if ( !empty( $time_since ) ) : ?>
<li class="topic-freshness-time <?php echo $show_iconla ; ?> ">
<?php
echo $settings['last_activity'];
echo $time_since ;
?></li>
<?php endif; ?>
<?php if ( is_user_logged_in() ) : ?>
<?php $_topic_id = bbp_is_reply_edit() ? bbp_get_reply_topic_id() : $topic_id; ?>
<li class="topic-subscribe"><?php bbp_topic_subscription_link( array( 'before' => '', 'topic_id' => $_topic_id ) ); ?></li>
<li class="topic-favorite"><?php bbp_topic_favorite_link( array( 'topic_id' => $_topic_id ) ); ?></li>
<?php endif; ?>
<?php
echo '</ul>' ; // end of '<ul class="bsp-st-info-list">;
echo '</div>'; // end of '<div class="bsp-st-title-container">';
}
Around 725
<li class="topic-freshness-time <?php echo $show_iconla ; ?> ">
<?php
echo $settings['last_activity'];
echo $time_since ;
?></li>
<?php endif; ?>
<?php if ( is_user_logged_in() ) : ?>
<li class="forum-subscribe">
<?php
bbp_forum_subscription_link( array( 'forum_id' => $forum_id ) );
?></li>
<?php endif; ?>
<?php
echo '</ul>' ;
echo '</div>' ; // end of <div class="bsp-st-title-container">
}
sorry I’m really busy at the moment – it would really help me if you could paste revised code 🙂
Another tweak (both for st and sf)
You could move from 556 to 562
over the 555:
echo '</ul>' ; //end of '<ul class="bsp-st-info-list">'; ?>
To have all “li” in the same “ul”
(Same in line 725)
Remember to close some of the ?>
lingering afterwards 🙂
484 and 652
echo '<div class="widget bsp-st-title-container">';
echo '<div class="widget bsp-sf-title-container">';
Great! I also use Code Snippets for some things too. Well done.
Hallelujah, it worked! Thank you so much!! I ended up using the Code Snippets plugin because I’m not super comfortable with php, child themes, etc.
Hi Annie, Thanks so much for your help and taking the time to write!!! I am going to try this. I also am not keen on adding any more plugins..I have too many already as it is. I am not a developer and don’t write code so it is really great when someone shares information like this.
All the best!
Hi 007elt, After much searching and some testing I found a solution that converts the HTML version of the text editor into a basic TinyMCE editor. However, you must have FTP or cPanel access to the backend files in order to add code to your theme/child theme’s functions.php file. Otherwise a plugin is the only other resort, and I prefer not to load up on plugins.
If you have access, add these two code snippets. The first one will convert the text editor to a basic TinyMCE, and the second will strip out html code from content pasted into the text editor that was copied from another web page.
function bbp_enable_visual_editor( $args = array() ) {
$args[‘tinymce’] = true;
$args[‘quicktags’] = false;
return $args;
}
add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );
function bbp_tinymce_paste_plain_text( $plugins = array() ) {
$plugins[] = ‘paste’;
return $plugins;
}
add_filter( ‘bbp_get_tiny_mce_plugins’, ‘bbp_tinymce_paste_plain_text’ );
And, if you want to get rid of the word “Private” that displays in the title of a forum that is set to private, put this code in your child theme’s functions.php file also:
function remove_private_prefix_from_title( $title ) {
return ‘%s’;
}
add_filter( ‘private_title_format’, ‘remove_private_prefix_from_title’ );