hmm, can’t see why it shoudln’t work
try for test purposes
<?php
$topic = bbp_get_topic_id();
$users = get_users() ;
$countsub = 0;
foreach ($users as $user) {
$topicsub_list = array(get_usermeta ($user->id, 'wp__bbp_subscriptions', false)) ;
echo '<br>Topic : '.$topic ;
echo '<br>user_id: '.$user->id.'<br>' ;
var_dump ($topicsub_list) ;
if (in_array ($topic , $topicsub_list)) $countsub++ ;
}
echo $countsub;
?>
that should help you find out where the problem is
I created a topic and had several replies.
I clicked on the link to read the latest reply (from the email notification) and the reply was visible on screen.
1/ Is it not possible to get it to display the reply within the context of the topic rather than just the reply itself?
2/ If I click on “Rely” at the top of this single reply entry nothing happens. I have to click on the breadcrumb to view the full topic and then I can click the Reply link.
I would have thought that if the system was designed to show the isolated topic that hitting Reply would invoke the full topic with the reply form.
Thoughts?
I noticed during my testing of bbPress that if I move a topic from one forum to another that the freshness doesn’t get refreshed.
Is this a bug or is there a design process I am not aware of?
I guess I will be patient for you to test this Robin
$topic = bbp_get_topic_id();
$users = get_users() ;
$count = 0;
foreach ($users as $user) {
$topic_list = get_usermeta ($user->id, 'wp__bbp_favorites', false) ;
if (in_array ($topic , $topic_list)) $count++ ;
}
echo $count;
I am getting the error
Warning: in_array() expects parameter 2 to be array, string given in C:\wamp\www\omna\wp-content\themes\omna2\bbpress\content-single-topic-lead.php on line 134
under 2.5.14 favorites are stored in usermeta under ‘wp__bbp_favorites’ as a list of topics
so to get a count for a topic, you would need to loop through all users and for each one count if the current topic was in it.
so something like (not tested as am tied up elsewhere, so just spending 5 mins on this)
$topic = some function to get current topic number if not already there
$users = get_users() ;
$count = 0 ;
foreach ($users as $user) {
$topic_list = get_usermeta ($user->id, 'wp__bbp_favorites', false) ;
if (in_array ($topic , $topic_list) $count++ ;
}
echo $count ;
ok, you may need to debug your email system
start with
WP Test Email
then it may be your host provider is stripping emails with many bcc’s in it – some do because of spam, so then look at
AsynCRONous bbPress Subscriptions
let us know how you get on
could be many things
It could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
I’m using WordPress 5.2.4, bbPress 2.6 RC 7. I can privately give anyone in-the-know and willing to help a link to a test site.
Symptoms – A search with one word typically works, but a search with more than one word typically gives HTTP error 500. Another symptom, the search first results page isn’t themed.
The symptoms occur with any/all themes, with all plug ins disabled except bbpress.
The symptoms appear like a server resource issue, but this is an AWS machine and more memory/CPU, increasing memory_limit in php.ini, doesn’t change symptoms.
Is there a limit on database size bbPress can handle? The site has roughly 18K users, 100 Forums, 30K Topics, 160K replies.
I’m grateful for any help, direction, diagnostics.
So I will be calling babblebey_has_topics() ?????? Please see as stated below too
<!--Sidebar Start-->
<div class="col-md-4">
<div class="sidebar-topics row sticky-top">
<div class="col-md-12 col-sm-12 col-12 ml-2 mb-2 p-1">
<h3 class="">Latest Forum Topic</h3>
</div>
<div class="col-md-12 col-sm-12 col-12">
<?php
if ( babblebey_has_topics() ):
while ( babblebey_topics() ) : babblebey_the_topic();
get_template_part( 'template-parts/topic', 'card' );
endwhile;
endif;
?>
</div>
</div>
</div>
<!--Sidebar Ends-->
Thank you!
Should I insert the code above in my functions.php as it is, and use [bbp-single-topic id='.$forum_id.'] in my template?
The fact that is not tested, can it break my site?
untested, but try
$title = get_the_title() ;
$forums = bbp_get_forums_for_current_user() ;
foreach ($forums as $forum) {
if ($forum->post_title == $title) {
$forum_id= $forum->ID ;
}
}
do_shortcode( '[bbp-single-topic id='.$forum_id.']' );
The Post Per Page as its been set up from the “Forum Setting”:

Works as it should, i.e dictate the number of topics to display per Single Forum Page:

But the same setting is inturn affecting my custom loop I have placed on my HomePage Sticky Sidebar to display latest topics:

I want something similar to the ` $args = array(‘posts_per_page’ => 10 //my custom number) as its being used in the normal WP Post Loop like this below:
<?php $args = array(
‘posts_per_page’ => 10 // Like this one here
);
$posts = new WP_Query($args);
if ($posts->have_posts()):
while($posts->have_posts()): $posts->the_post();
get_template_part( ‘template-parts/content’, get_post_format() );
endwhile;
endif;
wp_reset_postdata(); ?>
`
Hello there,
Thank you for viewing this thread.
I am trying to set a button for based on users current forum subscription status
When a User “is not Subcribed” to Current Forum
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell"></i> <?php bbp_forum_subscription_link(); ?></button>
<p>Subscribe to this forum and get updates on latest topics</p>


When a User “is Subscribed” to Current Forum
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell-slash"></i> <?php bbp_forum_subscription_link(); ?></button>
<p>Unsubscribe from this forum and stop receiving updates on latest topics</p>

So My Code is suppose to look something like
<?php if (user_is_subcribed_to_this_forum): ?>
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell-slash"></i> <?php bbp_forum_subscription_link(); ?></button>
<p>Unsubscribe from this forum and stop receiving updates on latest topics</p>
<?php else: ?>
<button type="button" class="btn-lg omna-btn-green shadow-sm" id="forum-subscription-btn"><i class="fa fa-bell"></i> <?php bbp_forum_subscription_link(); ?></button>
<p>Subscribe to this forum and get updates on latest topics</p>
<?php endif; ?>
The right function to use in-place of user_is_subcribed_to_this_forum is what i seek.
Thanking you in anticipation of a working response.
Hello there,
Thank you for viewing this thread.
I have a sidebar on the Homepage of my website that should list latest forum topics. But the number of topics listed is being determined by the “number of topics” set per-page in the “Forum Settings”.
Is there a way to setup an argument($args) similarly to that of the new WP_Query($args) to set a custom of topics per-page.?
Here’s my query:
<!--Sidebar Start-->
<div class="col-md-4">
<div class="sidebar-topics row sticky-top">
<div class="col-md-12 col-sm-12 col-12 ml-2 mb-2 p-1">
<h3 class="">Latest Forum Topic</h3>
</div>
<div class="col-md-12 col-sm-12 col-12">
<?php
if ( bbp_has_topics() ):
while ( bbp_topics() ) : bbp_the_topic();
get_template_part( 'template-parts/topic', 'card' );
endwhile;
endif;
?>
</div>
</div>
</div>
<!--Sidebar Ends-->
then you need to amend form-topic and form-reply
to amend
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
to something like (untested)
<?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
<?php endif ; ?>
<?php else : ?>
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Update', 'bbpress' ); ?></button>
<?php endelse : ?>
Hi, there!
I use the latest version of bbPress. Just found a login status issue on my forum https://forum.themevan.com
Reproduce the issue:
– Access to a sub-forum page before logging in
– Log in your account
– Back to that sub-forum page
You will see the reply form still doesn’t display and this page is unlogged in status, if you refresh this page, it works fine.
How to fix this issue?
Thanks!
I also have the same problem that I do a test and the registration email is intercepted as a suspected bot. I get redirected to https://mysite.org/wp-login.php?action=register
I am using WP Mail SMTP, I and I did a check mail which worked… and I have the correct host email name in settings/general, so I don’t see why the above is happening.
untested, but this might do it
add_filter( 'bbp_get_reply_author_display_name' , 'rew_reply_change_to_login', 10 , 2 ) ;
function rew_reply_change_to_login ($author_name, $reply_id) {
// Get the author ID
$author_id = bbp_get_reply_author_id( $reply_id );
$author_name = get_the_author_meta( 'user_login', $author_id );
return $author_name ;
}
add_filter( 'bbp_get_topic_author_display_name' , 'rew_topic_change_to_login', 10 , 2 ) ;
function rew_topic_change_to_login ($author_name, $topic_id) {
// Get the author ID
$author_id = bbp_get_topic_author_id( $topic_id );
$author_name = get_the_author_meta( 'user_login', $author_id );
return $author_name ;
}
let me know
The only plugin that does what you need is my GD bbPress Toolbox Pro: https://plugins.dev4press.com/gd-bbpress-toolbox/ and if you want, I can set demo website for you to test it.
Regards,
Milan
untested but try
if ( current_user_can( 'subscriber' ) ) {
add_action('wp_before_admin_bar_render', 'rew_admin_bar_remove_wp_profile', 0);
add_action('admin_bar_menu', 'rew_add_bbp_profile', 999);
}
function rew_admin_bar_remove_wp_profile() {
global $wp_admin_bar;
/* **edit-profile is the ID** */
$wp_admin_bar->remove_menu('edit-profile');
}
function rew_add_bbp_profile($wp_admin_bar) {
$current_user = wp_get_current_user();
$user=$current_user->user_nicename ;
$user_slug = get_option( '_bbp_user_slug' ) ;
if (get_option( '_bbp_include_root' ) == true ) {
$forum_slug = get_option( '_bbp_root_slug' ) ;
$slug = $forum_slug.'/'.$user_slug.'/' ;
}
else {
$slug=$user_slug . '/' ;
}
$profilelink = '/' .$slug. $user . '/edit' ;
$wp_admin_bar->add_node( array(
'parent' => 'user-actions',
'id' => 'bbp-edit-profile',
'title' => 'Edit Profile',
'href' => $profilelink,
) );
}
OK, I am a bit confused.
I create test account and started a topic.
I immediately see that there is no status | type drop-down lists so that is good.
But I put 3 hyperlinks in the topic and hit submit and it went through the system. So why did it do this when we have said comments with over 2 links should flag for moderation?
just set yourself up a test account
so create a user called say ‘myusertest’ and give it a fictitious email account – it has to be in the correct format so say ‘abc@def.com’ and set a password
you can then log on as that user and you’ll get participant access to see.
probably – suggest you test with users of different capability if you want to be sure
This code (untested) should subscribe all current users to forum ID 3
$list = get_users();
if (empty (get_option ('rew_done')) {
foreach ($list as $user) {
$user_id = $user=>ID ;
$forum_id = 3 ;
bbp_add_user_forum_subscription( $user_id, $forum_id ) ;
}
update_option ('rew_done' , 'done' ) ;
}
Put this in your child theme’s function file – or use
https://en-gb.wordpress.org/plugins/code-snippets/ and load a page, then remove it
in style pack, I just list plugins I have found and used on client sites, and were working at the Time of testing. I can’t say if they still work, and sorry don’t have time to test regularly 🙂