/**
* Add our post types to the query.
*
* @since 1.0.0
*
* @param object $query WP_Query instance.
*/
function pluginize_amend_term_archive( $query ) {
if ( is_admin() || ! $query->is_main_query() ) {
return;
}
if ( ! $query->is_category() ) {
return;
}
$query->set(
'post_type',
array_merge(
[ 'post' ],
cptui_get_post_type_slugs()
)
);
}
add_action( 'pre_get_posts', 'pluginize_amend_term_archive' );
