Well, for your specific case, you would probably go with:
function bbptoolkitpc_shorten_freshness_time($return) {
$return = str_replace( "hour", "hr", $return );
$return = str_replace( "minutes", "min", $return );
return $return;
}
add_filter( 'bbp_get_time_since', 'bbptoolkitpc_shorten_freshness_time' );
add_filter( 'bp_core_time_since', 'bbptoolkitpc_shorten_freshness_time');
Pascal.
Hi,
The section is fine đ
You will have to change the regular expression inside, but the basic function would look like this:
function bbptoolkitpc_shorten_freshness_time($return) {
$bbptoolkit_short_fresh = get_option('bbptoolkit-short-fresh', false);
if ($bbptoolkit_short_fresh) {
$return = preg_replace( '/, .*[^ago]/', ' ', $return );
}
return $return;
}
add_filter( 'bbp_get_time_since', 'bbptoolkitpc_shorten_freshness_time' );
add_filter( 'bp_core_time_since', 'bbptoolkitpc_shorten_freshness_time');
Pascal.
Hi,
It depends if you want to play yourself with CSS like this:
.bbp-topic-content p,
.bbp-reply-content p {
font-size: 16px;
}
Or if you want Robin’s plugin that can do most of that for you : https://wordpress.org/plugins/bbp-style-pack/
Pascal.
Then I’m really out of ideas đ
What you could do is just delete all of it and restart from scratch : https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/
There is something wrong with your local installation… I have never created a local one, but immediately went to a provider to have an account (even the very basic one). Maybe someone else has some ideas here.
Pascal.
I’ve tried to use single-user.php instead of page.php to display user profile, following this: https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/
But my single-user.php show posts, instead of user info. Why?
But did you put the [bbp-forum-index] shortcode on that page ?
Hi Casiepa and thx for your answer đ
I already tried this operation several times without results …
This is my activate extension :
Akismet, bbP private groups, bbp style pack, bbPress, bbPress Enable TinyMCE Visual Tab, bbPress Go To First Unread Post, bbPress New Topics, bbPress New UI, bbPress Quotes, bbPress Unread Posts v2, bbPress Votes, bbPress WP Tweaks, bbPress2 BBCode, bbPress2 shortcode whitelist, BBSpoiler, BuddyPress, BuddyPress Captcha, Emojin, GD bbPress Tools, Krown Portfolio, Mandrill For WordPress – Email form under Post, oAuth Twitter Feed for Developers, Revolution Slider, TinyMCE Advanced, User Role Editor, Widgets on Pages, WordPress Social Login, WP Emoji One, WP Maintenance Mode, WP ULike, WPBakery Visual Composer
Perhaps one is inconsistent ?
I modify CSS too, but i think it’s not a problem ?
Hi Rhonda,
Never give details in here as millions will see it when picked-up by search engines, I agree with that.
You say you created your own page for the forums. What did you put in it ? Did you put and [] shortcode ?
Pascal.
Nevermind, I traced to problem back to other code that’s using a bbpress filter and causing this issue.
Yep, the default theme there’s no topic display issue (tested before I posted here.) Just wondering if there was a standard code snippet that should be included in any template in order to get bbpress (wasn’t thinking it would be terribly different from template to template.) Since it’s a pro template, at least I can give their support forum a shot.
Anyone out there w/a similar theme conflict issue, how did you resolve it?
I am so very frustrated…I am getting very very close to completing my website and getting it out in cyberspace…but one problem I am having is that I cannot get the forum in bbpress to work correctly…I have buddypress set up as well and it is working fine…I created a forum page which is showing as a child page under my “community” tab in the main header menu…when going to the forum page there is nothing at all except what I wrote when creating the page…by tutorials I have seen there should be other things showing such as “topics” and “replies” and there is nothing showing up…please help I am so so frustrated…is it that my theme doesn’t support it or do I have to break into code…Also I am afraid to send my login info or any other private info as not sure who all is seeing it….I will be checking back later tonight…I will probably be stuck on this all night as I am determined to figure this out!! Thanks, Rhonda
Hi, this was a good lead. My host had another recepie for .htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/
RewriteRule .* - [CO=wordpress_test_cookie:WP+Cookie+check:%{HTTP_HOST}:1440:/]
It worked at once.
Thx
Hello,
I have experienced an issue importing posts from a BuddyPress group forum. Originally I lost the link to all topics when I manually deleted some spam users directly in the tables wp_users and wp_bp_groups_members. In the group forum it simply stated “Sorry, there were no forum topics found.” So I thought I would upgrade to bbpress using the instructions here: https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/
I followed all instructions up to the import process and then the import just got stuck – i.e. nothing was imported.
Then I noticed no forums are now listed under Forums.
So I created a new forum, which looks different to the previous forum (presumably because I am now using bbpress and not the old Buddypress group forum – how to tell?). I can link this forum to my one Buddypress group, but now none of the old topics show – they are all still in the WordPress database, but I need to know how to get them into the new forum that I have created, or import them some other way.
I would be grateful for any advice.
Thanks,
Nick
In loop-fourms.php file add your custom âAdd Topicâ button:
<a href="/new-topic/?ForumId=<?php echo bbp_get_forum_id()?>">New Topic</a>
Add this code to a custom .php file or directly to your theme function.php file:
//BBpress New Topic Button //
add_shortcode('wpmu_bbp_topic', 'wpmu_bbp_create_new_topic', 10);
function wpmu_bbp_create_new_topic(){
if ( isset($_GET['ForumId']) ){
return do_shortcode("[bbp-topic-form forum_id=".$_GET['ForumId']."]");
}else{
return do_shortcode("[bbp-topic-form]");
}
}
//End BBpress New Topic Button //
Make sure youâve created a custom page titled ânew topicâ with a friendly url of ânew-topicâ
Place the new shortcode we registered into this page:
[wpmu_bbp_topic]
This will automatically display contact create form of the selected forum if ID exists in the URL otherwise fall back to default shortcode.
You can see it in action on my site:
http://artofwargaming.net/forums/
Hope this helps anyone who was looking to create a ânew topicâ button.
I canât take credit for this, this was all thanks to the help of the guys over at WPMUDEV â Sajid, Anang, and Tyler.
Hi,
Most probably a security issue or a redirect to your login page that does not work. If you have any security plugins (like Theme my login) or captcha (like in Jetpack), try to deactivate. Somebody found this: https://bbpress.org/forums/topic/users-unable-to-register-and-login/
Just be careful : Editing .htaccess can block your complete site. Make sure you have a contact point with your provider and you know what you are doing
Defaults for the .htaccess can be found here: https://codex.wordpress.org/htaccess
Let me know if it helped,
Pascal.
1.
Instead of using the shortcodes, download this loop-forums.php file and place it in your child theme in a folder called bbpress.
https://github.com/robkk/bbPress-Hierarchical-Forum-and-Category-Layout
2.
I think this would show up if you use the file above. It might not have nice color coordinated categories though.
3.
Download this bbpress.php and put it in the root of your theme to have full width forums.
https://gist.github.com/robkk/f51753f1c7a5641796d8
Hello. I want to disable the edit profile link on my forum using bbpress, which I have found the following code to add to functions.php. It works, except for next to the username and profile pictures there is a comma, and it looks messy… anyone with php knowledge know why this code is producing a comma next to the username and profile pic?
Thanks
<?php
add_filter( ‘bbp_get_author_link’, ‘remove_author_links’, 10, 2);
add_filter( ‘bbp_get_reply_author_link’, ‘remove_author_links’, 10, 2);
add_filter( ‘bbp_get_topic_author_link’, ‘remove_author_links’, 10, 2);
function remove_author_links($author_link, $args) {
$author_link = preg_replace(array(‘{<a[^>]*>}’,'{}’), array(“,”), $author_link);
return $author_link;
}
?>
I use the following code on a webshop to display all tags being used on the website in the custom post type product
<?php
$terms = get_terms( 'product_tag' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
print '<option data-filter="tag-'.$term->slug.'"value="tag-'.$term->slug.'">'.$term->name.'</option>';
}
} ?>
How do I find the equivalent for bbPress to `product_tag
Link to your site as @casiepa suggested, so we can check on it and make sure.
You can try some troubleshooting to see if this only occurs in your current theme. You can try the other additional solutions to troubleshoot too.
Troubleshooting
There is an issue with the .hentry class that bbPress is inheriting for its posts. This is a common theme conflict.
#bbpress-forums .bbp-body .hentry {
margin: 0;
}
Some themes are not handling well the replies. Could you try to add this somewhere as extra css:
#bbpress-forums .reply {
font-size: inherit;
padding: inherit;
position: relative;
right: inherit;
top: inherit;
}
Pascal.
It is a common theme issue related to styling wordpress comments.
Your theme has this CSS to style the wordpress comments. Thing is bbPress has an entire class for each reply which is .reply and it affected any link in a bbPress reply.
.reply a {
font-weight: bold;
float: left;
padding: 0;
font-size: 12px;
}
Add this custom css anywhere you can add custom css like in your child themes style.css stylesheet or in a separate plugin.
#bbpress-forums .reply a {
float: none;
}
I don’t think there is a free version of this plugin.
There isn’t even a free extension for users to use to make it work with bbPress from what I can see.
I would like to know how to remove the link to main Forum page that appear in the course unit when I embed the topic ( [bbp-single-forum id=$forum_id]) . for instance, Which file and where is it located, and what I have to change?
bbPress uses custom post types which are similar to the WordPress posts, it just outputs different templates for the display of the forum posts.
Deleting these posts, would make the shortcode not owrk.
What you would need to do is conditionally allow only users of a certain course to be able to see a certain forums or topics from bbPress’s pages not just use a shortcode to place a forum on a course page.
I have found that some user recommend some additional membership/restrict content plugins to make it work for bbPress forums this way.
It might be best to contact the wpcourseware plugins support to know what is best to hook up bbPress with that plugin.
But my link is not ending with a “/”. And it is not only when using the shortcode [url] but also when using wordpress toolbar for inserting the link.