bbpress search results are not accordance
-
i use twentythirteen theme as my parent theme and bbpress plugin to bulid my forum. In the search results page, the first result format is a bit different with the others.
according to my understanding, the execute order is: page.php->content-search.php->loop-search.php->loop-search-topic.php
in page.php:<div class="entry-content"> <?php the_content(); ?> </div><!-- .entry-content -->
in content-search.php:
<?php bbp_get_template_part( 'loop', 'search' ); ?>
in loop-search.php:
<?php while ( bbp_search_results() ) : bbp_the_search_result(); ?> <?php bbp_get_template_part( 'loop', 'search-' . get_post_type() ); ?> <?php endwhile; ?>
in loop-search-topic.php:
<div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> </div>
If there are three topics,the results should be:
<div class="entry-content"> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> </div>
However, the result is:
<div class="entry-content"> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> </div> </div> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>> <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
The first element is inside <div class=”entry-content”> tag.
- You must be logged in to reply to this topic.