Skip to:

Why BBP Doesn’t Show Topics for Swagger Theme

  • BenRacicot


    Hello, After months of going back and forth I think I’ve come to understand why BBP doesn’t work in the theme I’m using.
    The Author has a pre_get_posts function defining how posts get queried. While this is necessary for the theme it’s ruining BBPress (which won’t display it’s topics unless the pre_get_posts filter is commented out)

    `if(!is_admin()) {
    //if ( ‘forum’ != get_post_type() ) { //conditionals WILL NOT work to stop the filter here…
    add_filter(‘pre_get_posts’, ‘query_post_type’);

    function query_post_type($query) {
    global $oswcPostTypes;

    if(empty( $query->query_vars[‘suppress_filters’] ) ) {
    $post_type = get_query_var(‘post_type’);
    //get theme options
    global $oswc_reviews;
    if($post_type) {
    $post_type = $post_type;
    return $query;
    } elseif(!is_page() && !is_preview() && !is_attachment() && !is_search()) {
    $post_type = array(‘post’);
    foreach($oswcPostTypes->postTypes as $postType){
    array_push($post_type, $postType->id);
    return $query;

    Could someone help me understand what options I have since I cannot conditionally fire that pre_get_posts function and it’s breaking BBPress?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar