Skip to content

Instantly share code, notes, and snippets.

@damiencarbery
Created February 29, 2020 20:38
Show Gist options
  • Save damiencarbery/e87e7d0bed3339637c7073c067e6026b to your computer and use it in GitHub Desktop.
Save damiencarbery/e87e7d0bed3339637c7073c067e6026b to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Debug WP Job Manager template files
Plugin URI: https://www.damiencarbery.com
Description: Try to debug why WP Job Manager is not finding the template file. From Advanced WordPress Facebook group.
Author: Damien Carbery
Version: 0.1
*/
add_filter( 'job_manager_locate_template', 'dcwd_job_manager_locate_template', 10, 3 );
function dcwd_job_manager_locate_template( $template, $template_name, $template_path ) {
error_log( 'Template: ' . var_export( $template, true ) );
error_log( 'Template Name: ' . var_export( $template_name, true ) );
error_log( 'Template Path: ' . var_export( $template_path, true ) );
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment