I have a plugin I have developed for a client which works fun on my server but doesn't work on theirs, they are on godaddy so I am guessing it's an issue with their PHP version?
add_filter('template_include', function ( $template ) {
if(is_tax('hha_cats')){
$template = dirname( __FILE__ ) . '/templates/category-hhavideo.php';
}
if( is_post_type_archive( 'hhavideo' ) ){
$template = dirname( __FILE__ ) . '/templates/archive-hhavideo.php';
}
return $template;
}, PHP_INT_MAX, 2 );
This code was written by another SE user after I was having another issue (here), is there a way to make this work with older versions of PHP? (Without checking, I believe her server is 5.2 and mine is 5.3).