Title: Bug: Doesn&#8217;t include &#8216;gdpr-modules&#8217; template from child theme
Last modified: November 16, 2018

---

# Bug: Doesn’t include ‘gdpr-modules’ template from child theme

 *  Resolved [simonpatterson](https://wordpress.org/support/users/simonpatterson/)
 * (@simonpatterson)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-doesnt-include-gdpr-modules-template-from-child-theme/)
 * Hi,
 * The ‘gdpr-modules’ folder can be copied/moved into your theme folder and modified
   to override the default plugin templates.
 * That’s all good, but if you use a child theme and move the ‘gdpr-modules’ folder
   into your child theme, it fails and doesn’t display anything.
 * This is because ‘moove-modules-view.php’ uses ‘locate_template()’ and ‘get_template_directory()’.
   It checks if the template file exists in either the parent or child theme, but
   then ASSUMES that it is in the parent theme.
 * A quick and dirty re-write of the ‘load()’ function to fix this problem:
 *     ```
       public static function load( $view, $content ) {
       	$view_name = 'gdpr-modules' . DIRECTORY_SEPARATOR . str_replace( '.' , DIRECTORY_SEPARATOR , $view ) . '.php';
       	$view_file_plugin = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . $view_name;
       	$view_file_theme = locate_template( $view_name );
       	ob_start();
       	if ( file_exists( $view_file_theme ) && is_readable( $view_file_theme ) ) {
       		include $view_file_theme;
       	} else if ( file_exists( $view_file_plugin ) && is_readable( $view_file_plugin ) ) {
       		include $view_file_plugin;
       	}
       	return ob_get_clean();
       }
       ```
   

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

 *  Plugin Author [Moove Agency](https://wordpress.org/support/users/mooveagency/)
 * (@mooveagency)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-doesnt-include-gdpr-modules-template-from-child-theme/#post-10899047)
 * Hi there,
 * Thanks for using our plugins, and for highlighting the loading issue with child
   themes.
 * This is fixed in the latest version, please update your plugin to the version
   1.1.9
 * I hope this helps.
 *  Thread Starter [simonpatterson](https://wordpress.org/support/users/simonpatterson/)
 * (@simonpatterson)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/bug-doesnt-include-gdpr-modules-template-from-child-theme/#post-10899139)
 * You missed the obstart() !

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

The topic ‘Bug: Doesn’t include ‘gdpr-modules’ template from child theme’ is closed
to new replies.

 * ![](https://ps.w.org/gdpr-cookie-compliance/assets/icon-256x256.png?rev=2376316)
 * [GDPR Cookie Compliance - Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law](https://wordpress.org/plugins/gdpr-cookie-compliance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gdpr-cookie-compliance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr-cookie-compliance/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [simonpatterson](https://wordpress.org/support/users/simonpatterson/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/bug-doesnt-include-gdpr-modules-template-from-child-theme/#post-10899139)
 * Status: resolved