Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save barrykooij/923d3810362999cee238cea4bb84c0c0 to your computer and use it in GitHub Desktop.
Save barrykooij/923d3810362999cee238cea4bb84c0c0 to your computer and use it in GitHub Desktop.
function rp4wp_wp_job_manager_use_normal_template( $located, $template_name, $args, $template_path, $default_path ) {
if ( 'related-post-default.php' === $template_name && 'job_listing' === $args['related_post']->post_type ) {
$manager_template = new RP4WP_Manager_Template();
$located = $manager_template->locate_template( 'related-post-default.php', $template_path, $default_path );
}
return $located;
}
add_filter( 'rp4wp_get_template', 'rp4wp_wp_job_manager_use_normal_template', 20, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment