assuming your acf field is called acf_category
you could do this..
$post = $wp_query->post;
$post_cat = get_field('acf_category', $post->ID);
switch($post_cat){
case "news":
include(TEMPLATEPATH.'/single-news.php');
break;
case "events":
include(TEMPLATEPATH.'/single-events.php');
break;
case "inspiration":
include(TEMPLATEPATH.'/single-inspriation.php');
break;
default:
include(TEMPLATEPATH.'/single.php');
}
note that you will probably have to change the switch
cases (this can also be done with if/else
) to reflect the actual slugs of your acf, these are just guesses. The important part is the get_field()
function call, which will pull the appropriate acf field for the post id given. Here is a list of all the acf functions, very well documented