bbp_the_search_result

Loads up the current search result in the loop.

Description

(object) bbp_the_search_result(); 

Returns (object)

Search information


Usage

  1. if ( !function_exists( 'bbp_the_search_result' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/search/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_the_search_result(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/search/template.php  
  1. function bbp_the_search_result() { 
  2. $search_result =bbpress)->search_query->the_post(); 
  3.  
  4. // Reset each current (forum|topic|reply) id 
  5. bbpress)->current_forum_id = bbp_get_forum_id(); 
  6. bbpress)->current_topic_id = bbp_get_topic_id(); 
  7. bbpress)->current_reply_id = bbp_get_reply_id(); 
  8.  
  9. return $search_result;