add_filter single_template
-
I set up the filter thus
if( !function_exists(‘get_single_template’) ):
function get_single_template($single_template)
{
global $wp_query, $post;
return get_site_url().’/wp-content/plugins/twsJobs/single-job.php’;
wp_reset_postdata();
}
endif;
add_filter(‘single_template’,’get_single_template’);I link to https://twsdev.co.uk/corp/job/web-designer/
where web-designer is a post
instead of printing “it works” – the only code (which I have run fine) in site_url().’/wp-content/plugins/twsJobs/single-job.php’
It displays
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
any ideas?
- The topic ‘add_filter single_template’ is closed to new replies.