i am having trouble with conditional and custom post types.
i would like to set something up like this:
<?php
if (in_term('products')){
include ('products.php');
}elseif (in_term('downloads')){
include ('downloads.php');
}else {
//Nothing Happens
}?>
Obviously this doesnt work, but if there is an alternative anybody knows then please share 🙂
Thank you,
Dan
http://codex.wordpress.org/Function_Reference/has_term
So…
Change
your_custom_taxonomy
to whatever that taxonomy name is. I changed include toget_template_part
. If this is found in a theme file, that’s the correct function to use. If it’s in a plugin, feel free to change it back.