Skip to:

Show topics based on custom field

  • inspirationally


    After moving my bilingual 200,000 posts forum from Woltlab to bbPress, I realized, that the completely English forum with English forum descriptions etc. is too difficult for some of the German members, so I would like to somehow filter the German topics.

    Already before importing, I created a custom field bbp_language and when creating the topic, they can chose a language, so that in the topic overview, you can see either of the flags – see

    With qTranslate, I can add German Forum descriptions, but maybe there is an easier possibility with just adding such a field to the Forum descriptions, not the whole site. I will have to write a little custom fields plugin for that.

    I have no idea yet, how to set the language…if to display one language only or all – if it is in the profile, Cookie, if it is a little extra-URL like /de/ or a drop down?!?

    My bigger problem is, how can I make, in the sub forums, that only threads with German or only English threads will be shown? Is there some filter / hook that I can use?
    Any file or function or short code?

    Like in „normal WordPress“ it would be

    <?php query_posts('meta_key=bbp_language&meta_value=German‘);  ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
Viewing 1 replies (of 1 total)

  • inspirationally


    Allright, found it in single-forum-content.php –

    <?php if ( !bbp_is_forum_category() && bbp_has_topics( array( 'meta_key' => '_bbp_language', 'meta_value' => 'German' ) ) ) : ?>

    should work

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