i try to do that : get posts of a category inside the spoiler
$content = '<?php if( have_posts() ) : ?><?php wpbf_archive_header(); ?><?php do_action( "wpbf_before_loop" ); ?><?php while ( have_posts() ) : the_post(); ?><?php get_template_part( "inc/template-parts/article" ); ?><?php endwhile; ?><?php do_action( "wpbf_after_loop" ); ?><?php else : ?><?php get_template_part( "inc/template-parts/article-none" ); ?><?php endif; ?>';
$my_shortcode = '[su_spoiler title="Informations d\'Occitanie" open="yes" style="default" icon="plus" anchor="" class=""]' . $content . '[/su_spoiler]';
the spoiler works but it returns no content