readme update
This commit is contained in:
parent
98bb0ec7de
commit
e60e99fe84
|
@ -8,7 +8,7 @@
|
|||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
* Domain Path: /languages/
|
||||
*/
|
||||
*/
|
||||
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
||||
|
@ -585,12 +585,26 @@ add_filter('single_template', 'mep_load_events_templates');
|
|||
add_filter('template_include', 'mep_organizer_set_template');
|
||||
function mep_organizer_set_template( $template ){
|
||||
|
||||
$cat_template_name = 'taxonomy-category.php';
|
||||
$org_template_name = 'taxonomy-organozer.php';
|
||||
$template_path = get_stylesheet_directory().'/mage-events/';
|
||||
|
||||
if( is_tax('mep_org')){
|
||||
$template = plugin_dir_path( __FILE__ ).'templates/taxonomy-organozer.php';
|
||||
|
||||
if(file_exists($template_path . $org_template_name)) {
|
||||
$template = get_stylesheet_directory().'/mage-events/taxonomy-organozer.php';
|
||||
}else{
|
||||
$template = plugin_dir_path( __FILE__ ).'templates/taxonomy-organozer.php';;
|
||||
}
|
||||
}
|
||||
|
||||
if( is_tax('mep_cat')){
|
||||
|
||||
if(file_exists($template_path . $cat_template_name)) {
|
||||
$template = get_stylesheet_directory().'/mage-events/taxonomy-category.php';
|
||||
}else{
|
||||
$template = plugin_dir_path( __FILE__ ).'templates/taxonomy-category.php';
|
||||
}
|
||||
}
|
||||
|
||||
return $template;
|
||||
|
|
Loading…
Reference in New Issue