I have a buddypress with a theme(youzify), I want to display activitys posts randomly on the wall, anyone knows any code, plugin or method for that
Hi, I tried to add the code snippet to my forum and as you can see on this page, the freshness is still appearing while it’s not on pc. Do you know how to fix this please ?
I was just about to post for a problem where some shortcodes were not working, when I actually READ THE POSTING INSTRUCTIONS! (Who would think?)
My problem was that the [bbp-register], [bbp-lost-pass], and [bbp-login] shortcodes weren’t working. The page / block with the shortcode was simply blank.
Per the ‘Before Posting’ topic, I switched my theme to Twenty Twelve. Poof! It all worked. So try that before digging deeper.
https://SolarGeoEngineeringNow.org
just got 10 minutes to look at this.
try this
add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;
function rew_display_acf () {
$id = bbp_get_reply_id() ;
//if it is the topic...
if (bbp_is_topic( $id ) {
echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2' ) ;
}
}
or
add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;
function rew_display_acf () {
$id = bbp_get_reply_id() ;
//if it is the topic...
if (bbp_is_topic( $id ) {
echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2', $id ) ;
}
}
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
Back end

So I want the custom field to show up here on the Front-end:

FYI the following code displays the custom field in the Front-end on pages, page.php in the template.
echo ‘Lake Marker 2: ‘ .get_field( ‘lake_marker_point_2’ );
I need this custom field in the front end of any topic post. I want it to show up underneath the bottom of the topic field.
Here is other code ACH generates. Not sure which one to use and what fle it is to be inserted into.
<div id=”view” class=”acf-view acf-view–id–57 acf-view–object-id–65″>
<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>
</div>
One more possible code:
echo ‘Lake Marker: ‘ .get_field( ‘lake_marker_point’ );
<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
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
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
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
Yes Robin, this is working.
So : I tried again you first add and it is working fine !
the html space code is still visible in TEXTE mode but not in the email.
I am very sorry because of still in the TEXTE mode visible I didn’t even tried first time to send a test subject and make you loosing time !
thank you for your perseverance and kindness.
I tried on the staging clone but I am going to use it on the production one. Thanks again.
Fred
ok, try this
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
//$message = str_replace (' ' , '', $message ) ;
$message = 'hello'.$message ;
return ($message) ;
}
This should simply add the word ‘hello’ before the message, which will prove that the filter is firing.
ok, just tried that in my test site and the code above seems to work.
1. can you give me a exactly what you have put into your functions file, with a few lines above and below
2. are you using any other bbpress related plugins?
3. are you using any mail related plugins?
Here is the ACF shortcode for a custom field. What bbPress template/file do I place this shortcode so that the custom field displays on the frontend of a topic post. Where do I place it.
[acf_views view-id=”60″ name=”Lake Point Marker 2″]
ok, presuming the characters are exactly this
sorry nothing further I can do.
if different put that in the appropriate line
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
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
Thanks for the code! I tested and it basically works well.
@ph59 if you found not working, try change
('12345,34567,78945')
to
('12345','34567','78945')
Regards.
ok, so put this before it
<?php
The only lines in the child theme functions.php file is the code you gave me. No lines before, nor after it.
Hello,
Please help me out with a code which I can use to display user’s topics started and replies created.
For example, being able to display this page
with only the “topic started” and “replies created” menu links.
I will appreciate a custom code which I can use to archive this.
NB; on the page where I want to display topics started/replies created, I’m also displaying a topic form using bbpress short code. I’d like the display of topics started/replies created to come after the bbpress topic form…
Thanks in anticipation that someone will help me out here with a code 🙏
ok, again untested but this
add_filter ('bbp_topic_admin_links' , 'surpress_moderator_links', 10 , 2) ;
add_filter ('bbp_reply_admin_links' , 'surpress_moderator_links', 10 , 2) ;
function surpress_moderator_links ($links , $id) {
if (bbp_is_topic( $id)) $forum = bbp_get_topic_forum_id( $id ) ;
if (bbp_is_reply( $id)) $forum = bbp_get_reply_forum_id( $id) ;
if (!in_array($forum, array ('12345','34567','78945'))) return $links ;
//if user is moderator but not a keymaster...
$user_id = wp_get_current_user()->ID ;
if (bbp_is_user_keymaster($user_id)) return $links ;
if (current_user_can( 'moderate')) {
//check if the topic/reply is posted by another moderator, and if so unset the links
if (bbp_is_topic( $id)) $author_id = bbp_get_topic_author_id( $id ) ;
if (bbp_is_reply( $id)) $author_id = bbp_get_reply_author_id( $id ) ;
if (bbp_get_user_role( $author_id) == 'bbp_moderator') {
unset ( $links ['approve'] );
unset ( $links ['spam'] );
unset ( $links ['trash'] );
unset ( $links ['move'] );
unset ( $links ['split'] );
unset ( $links ['edit'] );
unset ( $links ['move'] );
unset ( $links ['merge'] );
unset ( $links ['close'] );
unset ( $links ['stick'] );
}
}
return $links ;
}
just change ‘array (‘12345′,’34567′,’78945′))’ to have a list of the forum ID’s you want to check against
Thank you.
I will definitely keep this code handy. I will have several forums and need the code to function only for what will be the “Training” category of forums. Can this category be implemented in the code?
@ph59 – ah I see, then yes try the code above, if it doesn’t work, let me know and I’ll try and find time to fix it
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
maybe …not one the bbpress authors allowed for 🙂
anyway, totally untested as I need to be doing other things, but this might do it
revised code below
of course if moderators are allowed into the backend, then this becomes pointless, but I would argue that only admins should be backend access 🙂
I put the code in the child theme functions.php file.
I presume you are adding the adrotate with a shortcode – yes?
Hi,
WordPress 6.2.2 running Twenty Twenty-Three theme, BBPress 2.6.9.
Moved the only hidden (pending) topic from a public forum to a private forum, and published it. Topic, and moved replies all look fine in the private forum.
The public forum from whence it was moved still has this:
This forum has NN topics (+1 hidden), NNN replies …
As expected, clicking the +1 hidden
doesn’t change the number of topics displayed. Repaired the forum, cleared site cache, no change to the +1 hidden
.
If a detail in the move topic process was missed, please advise.
Thanks.