Output Beaver Builder CPT Posts in a Module that belong to a Custom Taxonomy

Using Beaver Builder loop modules to output posts can be limited when you want to output a CPT that belongs to multiple custom Taxonomies but you only want posts to display from one taxonomy – this can be achieved in code using the fl_builder_loop_query_args filter.

In the above code snippet – you need to ensure the BB Module has an ID set in the Advanced tab of the module and also in the filter above – then the taxonomy that you want is added in the tax_query array (or array of arrays) as the value for taxonomy.

It is also assumed that the actual CPT is chosen in the actual BB Module.

Now only posts from that chosen Taxonomy will be displayed.

Leave a Comment