Viewing 1 replies (of 1 total)
  • I don’t know that much about bbPress so I can’t help you retrieve the topics of a forum, but if you’re trying to relate forums to posts, CPT-onomies can do the trick.

    All you would have to do is attach your “forums” to your “posts” (you can take care of this in the settings panel) and then, while editing your post, assign your forum “xyz” to your post “xyz”.

    Placing the following code in your template will return an array of post IDs for all the forums that are related to the post you’re viewing.

    wp_get_object_terms( $post->ID, 'forums', array( 'fields' => 'ids' ) );

    Then it would just be a matter of using the forum post id(s) retrieve the topics.

    I hope this was helpful.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: CPT-onomies: Using Custom Post Types as Taxonomies] Relatiing bbpress forum and post by tit’ is closed to new replies.