Display several Custom Post Types on Posts Module

I am trying to show several CPTs on the post module but it only allows me to select a single type.

A similar question in the post below and a feature request was raised - just wondering if this was implanted or if there are any workarounds I can use.

https://community.wpbeaverbuilder.com/t/select-multiple-custom-post-type-on-posts-module/5666/7

Thanks

add_filter( 'fl_builder_render_settings_field', function( $field, $name, $settings ) {
	if ( 'post-type' === $field['type'] ) {
		$field['multi-select'] = true;
	}
	return $field;
}, 10, 3 );

It isnt fully supported, I mean it works but it will put a PHP warning in your logs.

Forgot to add, you need v2.5 to take advantage of this.

1 Like

thank you, perfect. Hopefully BB can build this into their module natively.

Thanks a lot for this very helpful code snippet! I am trying to display three post types within one module: posts, products and events.

The snippet helps me do exactly that - but it seems that the filtering option for limiting what items to display does not work. How to tell BB that i only want to display one item out of each post type (preferebly the newest of each, but i would be happy with an option that excepts the IDs as well…)?

The filter only enables the field to accept multiple types, the code in the post module is still not ready for multiple types. 2.6 on the other hand IS.