8 years, 10 months ago NazeemParticipant
I wanted to override the default templates, so I followed the instructions as provided:
I created the userpro folder in my-theme. i.e: my-theme/usepro.
Then I placed the template in that folder like this: my-theme/userpro/login.php.
However, when viewing the page, I get the following error:PHP123Warning: include(/home/nazeem/public_html/svisa-dev/wp-content/themes/Avada/userpro/login.php): failed to open stream: No such file or directory in /home/nazeem/public_html/svisa-dev/wp-content/plugins/userpro/functions/shortcode-main.php on line 530Warning: include(): Failed opening '/home/nazeem/public_html/svisa-dev/wp-content/themes/Avada/userpro/login.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nazeem/public_html/svisa-dev/wp-content/plugins/userpro/functions/shortcode-main.php on line 530
I did some research myself, and is seems that in
shortcode-main.phpyou are using the following method:
get_template_directory(). Because I am using a child-theme, this method will return the path to the parent theme. Could you make use of
get_stylesheet_directory(), so it will get the path to the child theme, if a child theme is active.8 years, 10 months ago NazeemParticipant
up..8 years, 7 months ago nickhempseyParticipant
This needs to be bumped. I’m running a child theme as well.
This is a super simple change that shouldn’t take more than 2 seconds using search and replace.8 years, 7 months ago nickhempseyParticipant
another note… there are multiple calls to
get_template_directory_uri(), these would all need to be changed to
get_stylesheet_directory_uri(). This will ensure that the stylesheets are loading on the front end from the proper directory.
You must be logged in to reply to this topic.