Support

Account

Home Forums ACF PRO Using get_template_part in acf Reply To: Using get_template_part in acf

  • I’m using ACF 5 but this solution doesn’t work for me:

    get_teplate_part('parts/content', get_sub_field('tipo_blocco'));

    tipo_blocco is a select field that if i put into the page i can see:

    echo get_sub_field('tipo_blocco');

    I’ve also tried to put the filed into a variable like this:

    $tipo_blocco = get_sub_field('tipo_blocco');
    get_teplate_part('parts/content', $tipo_blocco));

    Where is the mistake?