Title: Issue on template copy
Last modified: August 30, 2016

---

# Issue on template copy

 *  Resolved [Paulo Iankoski](https://wordpress.org/support/users/pauloiankoski/)
 * (@pauloiankoski)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/issue-on-template-copy/)
 * This plugin has an issue when check if template files was copied to child theme.
 * See above (index.php line 327):
 *     ```
       $kbe_archive_file = KBE_THEME_DIR.KBE_FILE_DIR.'/archive-kbe_knowledgebase.php';
               $kbe_kbe_file = KBE_THEME_DIR.KBE_FILE_DIR.'/kbe_knowledgebase.php';
               $kbe_style_file = KBE_THEME_DIR.KBE_FILE_DIR.'/kbe_style.css';
               $kbe_single_file = KBE_THEME_DIR.KBE_FILE_DIR.'/single-kbe_knowledgebase.php';
               $kbe_taxonomy_file = KBE_THEME_DIR.KBE_FILE_DIR.'/taxonomy-kbe_taxonomy.php';
               $kbe_tags_file = KBE_THEME_DIR.KBE_FILE_DIR.'/taxonomy-kbe_tags.php';
               $kbe_comment_file = KBE_THEME_DIR.KBE_FILE_DIR.'/kbe_comments.php';
               $kbe_search_file = KBE_THEME_DIR.KBE_FILE_DIR.'/kbe_search.php';
   
               if((!file_exists($kbe_archive_file)) or (!file_exists($kbe_kbe_file))or
                  (!file_exists($kbe_style_file)) or (!file_exists($kbe_single_file)) or
                  (!file_exists($kbe_taxonomy_file)) or (!file_exists($kbe_tags_file)) or
                  (!file_exists($kbe_comment_file)) or (!file_exists($kbe_search_file))) {
       ```
   
 * When checking for this file `KBE_THEME_DIR.KBE_FILE_DIR.'/archive-kbe_knowledgebase.
   php`, the plugin are checking for `get_template_directory() . get_template_directory()."/
   wp_knowledgebase/archive-kbe_knowledgebase.php"` where the file never will exists.
   Then, on every page load all template files are overwriten.
 * To fix it, just change from `KBE_THEME_DIR.KBE_FILE_DIR` to `KBE_FILE_DIR` between
   lines 327 and 334.
 * Thanks!
 * [https://wordpress.org/plugins/wp-knowledgebase/](https://wordpress.org/plugins/wp-knowledgebase/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Maeve Lander](https://wordpress.org/support/users/enigmaweb/)
 * (@enigmaweb)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/issue-on-template-copy/#post-6807433)
 * Thanks for reporting this Paulo. We’ve been working on a complete overhaul to
   the way templating works and have just released version 1.1 of the plugin which
   should addresses this along with a bunch of other template-related issues.

Viewing 1 replies (of 1 total)

The topic ‘Issue on template copy’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-knowledgebase_c56559.svg)
 * [WordPress Knowledge base & Documentation Plugin - WP Knowledgebase](https://wordpress.org/plugins/wp-knowledgebase/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-knowledgebase/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-knowledgebase/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-knowledgebase/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-knowledgebase/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-knowledgebase/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Maeve Lander](https://wordpress.org/support/users/enigmaweb/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/issue-on-template-copy/#post-6807433)
 * Status: resolved