Title: Plugin not loading customized template files from theme folder
Last modified: December 17, 2017

---

# Plugin not loading customized template files from theme folder

 *  [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/plugin-not-loading-customized-template-files-from-theme-folder/)
 * The theme is not loading customized files in my theme folder.
 * I followed the instructions here: [https://wordpress.org/plugins/wp-knowledgebase/#faq](https://wordpress.org/plugins/wp-knowledgebase/#faq)
 * Under “How do I customize the design?”
 * None of the template files are being loaded. I know this because I’ve hard coded
   some text into the file that is not being rendered on the page.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/plugin-not-loading-customized-template-files-from-theme-folder/#post-9791064)
 * I found the template chooser function, but when inspecting the shortcode function,
   the main “kbe_knowldegabse.php” file is hard coded and isn’t pulled by the chooser
   function. Is there a way to pull the customized file?
 * This line of the funciton below is a hard coded line that doesn’t allow customized
   files to be loaded:
 * $return_string = require dirname( __FILE__ ) . ‘/../template/kbe_knowledgebase.
   php’;
 * This line is saying: Grab the directory of this file, go up one level, then into“
   template” and grab the file. WIthout any template chooser references or “IF” 
   statements, customized files are irrelevant right now.
 * Is this something you can update?
 * function kbe_shortcode( $atts, $content = null ) {
    if ( !is_admin() ) { $return_string
   = require dirname( __FILE__ ) . ‘/../template/kbe_knowledgebase.php’; wp_reset_query();
   return $return_string; } } add_shortcode( ‘kbe_knowledgebase’, ‘kbe_shortcode’);
 *  [Blake](https://wordpress.org/support/users/alexanderblake/)
 * (@alexanderblake)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/plugin-not-loading-customized-template-files-from-theme-folder/#post-9797143)
 * Oh man, this is something I can’t help with, but here’s what I did.
 * I took the template folder and renamed it wp-knowledgebase and put it in my theme
   folder. That gave me the files to edit from the appearance editor in WordPress(
   in my theme).
 * I just added the shortcode to the KB page directly, and it all came together.
   I had to add a bunch of CSS to my theme panel to get the KB to look more like
   how I wanted it, but that’s all I did.
 * I wish I could help more.
 * Blake

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin not loading customized template files from theme folder’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Blake](https://wordpress.org/support/users/alexanderblake/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/plugin-not-loading-customized-template-files-from-theme-folder/#post-9797143)
 * Status: not resolved