untested but try
$forum = bbp_forum_id() ;
$parent = wp_get_post_parent_id($forum) ;
if (!empty($parent)) {
echo esc_html( get_the_title($parent) ) ;
}
Thank you dear for your quick reply ; i copy/past the loop single forum file into my child theme root (what i did is the good way to do that ?) , then i added your script like this :
<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>">
<?php $forum = bbp_forum_id();
$parent = wp_get_post_parent_id($forum);
if (!empty($parent)) {
echo esc_html( get_the_title($parent) ) ;
}
?> : <?php bbp_forum_title(); ?></a>
The result is that i got the id forum behind each forum title (on the main parents forums list) and on the subforum list (when i click on a forum on the forums list), i got the subforum id attached to parent title : subforum title
change
$forum = bbp_forum_id() ;
to
$forum = bbp_get_forum_id() ;
Perfect dear Robin
Thank you very much
btw : did i process in the good way to modify my bbpress template ?
The recommendation is that the file goes in a directory called ‘bbpress’ in the root of your child theme.
ie wp-content/themes/%your-theme-name%/bbpress/xxx.php
where %your-theme-name% is the name of your theme
child theme root works as well, but in ‘bbpress’ just makes it more obvious which plugin’s template you have amended
Thank you for your tips dear