Scrolling on reply url
You could remove the #postNumber part from the url, you can do something like this $reply_url = explode(‘#’, bbp_get_reply_url($reply_id))[0];
You could remove the #postNumber part from the url, you can do something like this $reply_url = explode(‘#’, bbp_get_reply_url($reply_id))[0];
How to exclude one parent id from post_parent’ => ‘any’, in WordPress / bbPress?
Can i use 2 page content-forum & content-forum-slug on bbpress?
How can I combine WordPress default Tags and bbPress tags into one archive page?
Add videos/images preview to bbPress attachment
If you are not going to use a ready made forum platform like : SMF phpBB Vbulletin myBB Vanilla becuase that site is not all forum but also a forum and you want wordpress as your platform then i would suggest you look at SimplePress as your forum plugin which is very mature and is … Read more
I think including a counter like this would do the trick. Does this help? <?php $showposts=2; $counter=0; while ( bbp_topics() ) : bbp_the_topic(); $counter++; if(counter<=$showposts) { ?> /*** Do stuff ***/ <?php } else { break; } endwhile; ?>
It appears the topic of a reply is stored in the _bbp_topic_id meta field. Older versions stored this in the post_parent field, but it seems this is deprecated? So you can add ‘&meta_key=_bbf_topic_id&meta_value=” . $post-ID to your query to get only replies to this topic.
post__not_in accepts an array so change <?php $postid = get_the_ID(); // capture the id ?> to <?php $postid[] = get_the_ID(); // capture the id ?> and you’ll be fine.
Try to drop that in your functions.php file: function filter_query_for_search( $query ) { if ( isset( $query[‘s’] ) ) { $query[‘post_type’] = array(‘forum’, ‘topic’, ‘reply’, ‘any’); } return $query; } add_filter(‘request’, ‘filter_query_for_search’, 1); that would hook into the query just before its being executed.