ControlledChaos
8/12/2016 - 2:42 PM

Get the title of the page used to display the bbPress forums archive/root. Example usage: as header text for all forum-related pages.

Get the title of the page used to display the bbPress forums archive/root. Example usage: as header text for all forum-related pages.

<?php
/**
 * Gets title for all bbpress pages.
 * 
 * To use only on specific pages use
 * specific conditional tags
 * 
 * https://codex.bbpress.org/bbpress-conditional-tags/
 */

if ( is_bbpress() ) {
  $the_title = bbp_get_forum_archive_title();
}

echo '<h2>' . $the_title . '</h2>';

?>

Get Forums Archive Title

WordPress/bbPress Snippet