traveljunkie (@traveljunkie)

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m aware of the search function breaking normal search behaviour, but it’s not a problem in my case. bbPress is sitting in a subdomain and there’s not gonna be any normal blog posts.

    As for the topic tags, they should only be limited to the topic post type, you’re right, but when I checked the actual query it turned out that the post, page and attachment post types were being queried, so the above snippet did fix that.

    Obviously these are only temporary fixes, but they’ll have to do for now until I find the time to dig deeper.

    Haven’t found the time to look into it in depth yet, so in the meantime I sorted things with these two functions:

    /**
    * Search only our forums and fix topic tags
    * @since 1.0
    */
    function click_help_add_to_search( $query )
    {
    if( $query->is_search )
    $query->set( 'post_type', array( 'topic', 'reply' ) );

    if( ! empty( $query->query_vars['topic-tag'] ) )
    $query->set( 'post_type', array( 'topic' ) );

    return $query;
    }
    add_filter( 'pre_get_posts', 'click_help_add_to_search' );

    /**
    * Remove error404 class from the body
    * @since 1.0
    */
    function click_help_remove_error404( $classes )
    {
    if( in_array( 'bbPress', $classes ) )
    {
    $error = array_search( 'error404', $classes );
    unset( $classes[$error] );
    }

    return $classes;
    }
    add_filter( 'body_class', 'click_help_remove_error404' );

    I’ve copied the template files across to the theme. There’s only minimal adjustments been made. It’s on my local machine, so can’t provide a link. Here’s a bit more info. It’s on a subdomain on a multisite installation.

    Just found out that the topic tags template never shows any topics and there’s quite a few tagged topics.

    I’ll dig a bit deeper into the code and let you know when I find something.

    SVN plugin branch. This is a topic for it after all ;)

    On the user and view pages the body tag has a class of error404, which kinda messes with the layout on my particular setup. I’m using the latest SVN trunk of BBP and the latest trunk of WP 3.2.

Viewing 5 replies - 1 through 5 (of 5 total)