Yes it looks like the default behavior is that the “sticky” link on the forum topic super stickies it, based on the super=1
query param I’m seeing. Any way to default it to 0
, or do I have to make a custom topic template?
Is it possible to show the number of topics and replies for each user in the main WP user admin screen? Or is there some other place I can see this? I have Admin Columns Free but no options are available that I can see, nor did I find anything in bbp style pack. Maybe another plugin or some code? Ideally there would be a column between Forum Role and Posts that shows Topics/Replies count. I’m assuming this is a bbp thing, but i’m of course using BuddyPress as well.
@liderxlt : have you managed to get it sorted. I’m trying to add a code snipped to BuddyBoss theme to run forum repair on daily basis. Can you share the code snippet with me please?
@robin-w: how can make use of includes/admin/tools.php functions through a theme code snippet?
I suggest this might help
#buddypress .standard-form #profile-details-section {
float: left !important;
}
put this in your theme’s custom css, or in the custom css of bbp-style-pack
Hope this helps. put these codes into your theme functions.php file.
add_filter( 'bbp_get_reply_author_url', 'lp_member_profile_links' );
add_filter( 'bbp_get_topic_author_url', 'lp_member_profile_links' );
add_filter( 'bbp_get_author_url', 'lp_member_profile_links' );
function lp_member_profile_links( $url ) {
if ( ! empty( $url ) ) {
return $url . 'profile';
}
return $url;
}
After much searching in that file and then further comparisons of the posts (and then the linked postmeta records) created vs those imported I spotted an error in the postmeta records for those imported.
I had had to write my own code to import a forum from WP Symposium and I had swapped two record numbers between two meta_keys. An update in the database table seems to have fixed this.
Thanks for your advice while I was finding the problem I had created!
these functions are held in bbpress\includes\forums\template.php and \bbpress\includes\forums\functions.php
the one changing the count is in functions.php
bbp_bump_forum_topic_count
Strange then that it also changed the total topic count. I will have another look at the code tomorrow.
Thanks.
I can’t see anything in the code that would do anything other than decrease the count by 1 on trashing a hidden or published topic.
If it was set to hidden, then it changes the following meta_bbp_total_topic_count_hidden
I’m the admin and I have FTP access so no problem for this. I just need to call bbpress links from endpoints, nothing more than this.
Because of course user can only have one profile page instead that 2 so just WooCommerce dashboard as a profile page.
As you mention there is not parameter in the line code :
/woo-bbpress/user-subscriptions.php
I think the page requires some parameters isn’t it?
Interestingly I also tried using the shortcode [bbp-stats] in a test page and that reported the correct number of topics despite the individual forum count being incorrect! How can that be?
I should start by saying that I am not a bbpress author, just someone trying to help 🙂
the [bbp-stats] shortcode does the wordpress function
wp_count_posts( bbp_get_topic_post_type())
so actually counts the number of topics in the database.
the forums page calls a function bbp_get_forum_topic_count in \bbpress\includes\forums\template.php
This looks up the number held in the forum’s post meta under _bbp_topic_count (which you had already worked out)
so how did you delete the post which caused the numnber to fail back?
Thanks for your reply.
I have looked at this in a bit more detail but not got anywhere!
As you suggested I compared two topics for a topic imported vs one entered and the differences don’t seem relevant (e.g. no ip address for the imported ones etc.). I also looked at the records from the postmeta table for the two topics and again don’t think there are relevant differences though again no ip address for the imported, 0 for _bbp_reply_count for the imported.
So no luck there.
I tried looking at the code of bbpress.php but could not work out how it picked up the count or incremented it.
Interestingly I also tried using the shortcode [bbp-stats] in a test page and that reported the correct number of topics despite the individual forum count being incorrect! How can that be?
In had a quick look at the code above and the call
include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );
is looking for that file in your theme, not the bbpress plugin.
as a test, create a directory in your child theme called ‘woo-bbpress’ (it can be called anything) and put a copy of the user-subscriptions in there
then replace then above with
include get_theme_file_path( '/woo-bbpress/user-subscriptions.php' );
and see if that improves
code below of course inserted in functions.php.
Any help please? Thank you so much
Im using the last bbPress version, and twenty-twenty theme. All fine!
But I need to integrate bbpress with woocommerce in a custom woocommerce dashboard we made, so basically I have to link all bbpress profile links (Topic created, Replies, Engagement…) as Woocommerce Endpoints.
All set up but the problem is the links not showng the correct user information but : “Oh Bother, no topics found here!”. Despite the user has created topics , followed or subscribed.
This is the code I put for the Subscription Endpoint for instance:
add_action( 'init', 'wpsh_subscriptions_endpoint' );
function wpsh_subscriptions_endpoint() {
add_rewrite_endpoint( 'subscriptions', EP_ROOT | EP_PAGES );
}
add_action( 'woocommerce_account_subscriptions_endpoint', 'subscriptions_endpoint_content' );
function subscriptions_endpoint_content() {
include get_theme_file_path( '/bbpress/templates/default/bbpress/user-subscriptions.php' );
}
so, any suggestions please? 🙂
without getting into looking at the code, you might want to look at the meta for a topic which is imported vs. one that is added. I think there is a ‘parent’ or ‘forum_id’ set in topic meta to say which forum it belongs to, which might need setting for the imported ones to get the repair tools and updates working correctly.
or even the actual post parent of the imported topic might need setting.
If it is not that, come back and I’ll do some digging further.
Sure, sorry, should’ve done that.
.bbp_dropdown {
font-size: 12px;
}
I added this at Appearance -> Customization -> Additional CSS. I’m using Astra Pro, but I think the location is the same for all/most themes.
but if those are the classes then
.ast-button
{
font-size: 8px !important ;
}
and/or
.ast-custom-button
{
font-size: 8px !important ;
}
in either your themes custom css area or my plugins custom css tab
ok, I can see it now.
Best I can suggest is
https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ item 8
otherwise beyond free help I’m afraid
Good afternoon,
I installed bbpress successfully and created a few forum entries.
also added a few test topics.
It displays fine: https://www.dealtimer.com/forums
Also, it displays one of the forum entries with a list of topics fine at
https://www.dealtimer.com/forums/forum/auto-dealer-csi-boosting-ideas
However, when I click one of the topics, it shows a content area blank below the header…
I changed the theme, and it works fine to show topic details and reply..
I even added a single page with a shortcode to display the topic, thinking that the CSS conflicts, it shows fine at https://www.dealtimer.com/single-topic-page.html
However, from the list of topics to browse the topic content, it fails.
When I looked at it, it even called content-single-topic.php code, however, I do not see bbp-container content being supplied to add a topic information page…
Do you have any idea about debugging this problem?
Thank you in advance for your help,
Jay M
I am using WordPress 6.1.1 and bbPress 2.6.9.
I have a forum where if I use the standard forum page e.g. mysite.com/forum/members-forum there are no problems and pagination of the large number of topics works correctly producing a URL of say mysite.com/forum/members-forum/page/3/
However, I wish to have a page with some other content at the to so are using a short-code to list the forum topics. The URL for that page is mysite.com/members-forum. However, on this page pagination does not work. The URL for the third page is mysite.com/members-forum/page/3/ but this produces an error 404.
I have tried various solutions found from others having a similar problem including: using a standard theme, resaving the permalink setting, adding a bp-custom.php file with some code in it etc. but it still fails.
Can anyone suggest a solution?
$user_id = get_current_user_id() ;
$user_url = bbp_get_user_profile_url( $user_id );
ooops, sorry, just remembered that this is a known error.
Ignoring Brizy (any remaining issues with Brizy you’ll need to get a developer to help with)
either install
bbp style pack
which has the fix for this built in
or use this code
add_action( 'wp_footer', 'rew_supports_js' );
function rew_supports_js() {
echo '<script>document.body.classList.remove("no-js");</script>';
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
@Robin-w A developer helped to look into it and found that the H1 tag is generated by this wordpress function https://developer.wordpress.org/reference/classes/_wp_editors/wp_link_dialog/
He also helped to temporarily edict the H1 tag to a H3 tag by editing the core files to temporarily solve the redundant H1 tag.
We texted the site without the core files edicts and on trouble shoot mood using the Troubleshoot plugin you recommended. Leaving only the Bbpress plugin and wordpress default theme enabled. I noticed that the new Topic form does not have an editing tool bar even when I “enabled” the editing formatting tool bar” on Bbpress settings.
When I proceeded to turn on 2 plugins in troubleshoot mode; Brizy page builder and Bbpress with the wordpress default theme. I placed the Bbpress “new Topic form short code” on a Gutenberg page on the site, then noticed the New Topic form still shows on the Gutenberg page but without the editor tool bar!
When the Bbpress short code is placed on a Brizy page, the Bbpress editor tool bar appears but doesn’t function properly. For example; the insert/edict link form does not appear as a “pop up” when I am trying to create a link on a post, instead the insert/edict link form appears on the footer.
I don’t know why this is happening. help!