Support MB Relationships How to use CPT as alternative to Taxonomy in Beaver Builder Reply To: How to use CPT as alternative to Taxonomy in Beaver Builder

#11933
Anh TranAnh Tran
Keymaster

Hi Dan,

To connect Solutions to Solutions Category, you need to install MB Relationships extension. And then follow the extension docs. Basically, all you need is the following code in functions.php:

add_action( 'mb_relationships_init', function() {
    MB_Relationships_API::register( array(
        'id'   => 'solutions_to_solution_categories',
        'from' => 'solution',
        'to'   => 'solution_category',
    ) );
} );

Then you can select connected solution categories when you edit a solution.

To get the connected solution categories to show on the frontend, I think it's hard to do in BB, since it doesn't support to make custom query with custom arguments yet :(. The way you query related posts is described here.