diff --git a/lib/show-template.php b/lib/show-template.php index e861303..3ab3e9a 100644 --- a/lib/show-template.php +++ b/lib/show-template.php @@ -1,6 +1,6 @@ template = $template; } } elseif ( is_search() ) { $template = get_search_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_tax() ) { $template = get_taxonomy_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_home() ) { $template = get_home_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_front_page() ) { $template = get_front_page_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_attachment() ) { $template = get_attachment_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_single() ) { $template = get_single_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_page() ) { $template = get_page_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_category() ) { $template = get_category_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_tag() ) { $template = get_tag_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_author() ) { $template = get_author_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_date() ) { $template = get_date_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } elseif ( is_archive() ) { $template = get_archive_template(); - if ( $template ) { + + if ( $template ) { $this->template = $template; } } else { $this->template = function_exists( 'get_index_template' ) ? get_index_template() : get_template_directory() . '/index.php'; } - $this->template = apply_filters( 'template_include', $this->template ); - // Hook into the footer so we can echo the active template + + $this->template = apply_filters( 'template_include', $this->template ); + + // Hook into the footer so we can echo the active template add_action( 'wp_footer', array( &$this, 'show_template' ), 100 ); }