We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The updates to get_template in inc/abstracts/abstract-addon.php disallowed template loading from Child Themes. This is the function:
public function get_template( string $template_name = '', $args = [] ) { $default_path = $this->plugin_folder_path . "/templates/$template_name"; $folder_name_rewrite = learn_press_template_path(); $from_theme_path = sprintf( '%s/%s/%s/%s/%s', get_template_directory(), $folder_name_rewrite, 'addons', str_replace( 'learnpress-', '', $this->plugin_folder_name ), $template_name ); $path_load = file_exists( $from_theme_path ) ? $from_theme_path : $default_path; Template::instance()->get_template( $path_load, $args ); }
There are a few problems here:
The text was updated successfully, but these errors were encountered:
Hi Polybear-Philippe,
get_template_directory() only returns the Theme not a child theme so you cannot put the template in the child theme
We added the commit.
file_exists call doesn't really work as the template_name doesn't have a ".php" suffix so it won't even find the template in a theme.
The file_exists function checks whether a file or directory exists. So if you set $template_name wrong, it will not run right.
Thanks for the feedback.
Sorry, something went wrong.
No branches or pull requests
The updates to get_template in inc/abstracts/abstract-addon.php disallowed template loading from Child Themes. This is the function:
There are a few problems here:
The text was updated successfully, but these errors were encountered: