BBP_Shortcodes::display_topic_index()

Display an index of all visible root level topics in an output buffer and return to ensure that post/page contents are displayed first.

Description

Parameters

$attr

(Required)

$content

(Required)

Return

(string)

Source

File: bp-forums/common/shortcodes.php

	public function display_topic_index() {

		// Unset globals
		$this->unset_globals();

		// Filter the query
		if ( ! bbp_is_topic_archive() ) {
			add_filter( 'bbp_before_has_topics_parse_args', array( $this, 'display_topic_index_query' ) );
		}

		// Start output buffer
		$this->start( 'bbp_topic_archive' );

		// Output template
		bbp_get_template_part( 'content', 'archive-topic' );

		// Return contents of output buffer
		return $this->end();
	}

Changelog

Changelog
Version Description
bbPress (r3031) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.