get_template_part not working with ajax
I loaded some contents by ajax, When i try something like this: $resp = array( ‘success’ => true, ‘data’ => ‘the content here’ ); it’s working without any issues but if i used something like this: $resp = array( ‘success’ => true, ‘data’ => get_template_part( ‘templates/update’, ‘profile’ ) ); it gives me SyntaxError: JSON.parse: unexpected … Read more