[Not a valid template] with non-galleryview template
-
When NextGEN-Galleryview is activated, using a non-galleryview template causes a [Not a valid template] error.
The problem is that the $galleryviewtemplate variable is not set in the add_template function of nggGalleryview.php file when a non-galleryview template is used.
Suggested fix:
// Add our Template function add_template( $path, $template_name = false) { if ( preg_match('/^gallery-galleryview(-.+)?$/', $template_name) ) { // Check theme for template first if ( file_exists (get_stylesheet_directory() . "/nggallery/$template_name.php")) { $galleryviewtemplate = get_stylesheet_directory() . "/nggallery/$template_name.php"; } else { $galleryviewtemplate = WP_PLUGIN_DIR . '/' . plugin_basename( dirname(__FILE__) ) . '/view/gallery-galleryview.php'; } } else { $galleryviewtemplate = $template_name; } return $galleryviewtemplate; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Not a valid template] with non-galleryview template’ is closed to new replies.