need to insert php code in path Get Template Part [closed] July 13, 2022 by Tarik Billa Looks like a syntax error, this should work for you: get_template_part('template/sliders/' . $template1, 'home');