PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.1
Forumax – AI Powered Advanced Community Forum Plugin v2.5.1
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
← All changes | templates/loop-topics.php +5 -3 2.5.0 → 2.5.1 View file →
@@ -43,11 +43,13 @@
43 43 ]
44 44 ];
45 45 }
46 46
47 -$query = new WP_Query( $args );
47 +// User profile pages render the bbPress topics loop below, so skip this query there.
48 +$is_user_page = forumax_is_user_profile_page();
49 +$query = $is_user_page ? null : new WP_Query( $args );
48 50
49 -if ( $query->have_posts() && !in_array('bbp-user-page', get_body_class()) ) :
51 +if ( ! $is_user_page && $query->have_posts() ) :
50 52 echo '<div class="community-posts-wrapper bb-radius">';
51 53 while ( $query->have_posts() ) : $query->the_post();
52 54 global $post;
53 55 $parent_post_id = get_queried_object_id();
@@ -130,9 +132,9 @@
130 132 <?php endif; ?>
131 133 </div>
132 134 <?php
133 135
134 -elseif ( in_array('bbp-user-page', get_body_class()) ):
136 +elseif ( $is_user_page ):
135 137 ?>
136 138 <div id="bbp-topic-<?php bbp_topic_id(); ?>" class="community-posts-wrapper bb-radius">
137 139 <?php
138 140 while ( bbp_topics() ) : bbp_the_topic();