Custom template won’t load
-
Hello,
I am having an issue getting a custom template to load. I have already viewed the recently closed topic here: https://wordpress.org/support/topic/template-doesnt-change/
But that did not help.
I have also looked around for other solutions but have not been able to find out why it’s not working.
Here is a gist of the functions.php function I am using: https://gist.github.com/nickyoung87/73c6190f73755096a2595dd0ecdeb03c
Other info:
– WordPress version is the latest version
– WPSL is the only plugin activated and is using the latest version
– Using Twenty Seventeen theme (no child)
– I have setup the Google API keys
– I have set the custom template from the dropdown in the settings
– I have made sure the custom template file does in fact exist in the theme folder at the correct location
– No console errors present
– Tried changing the priority on the filter to 99 just in case it was conflicting somehow with another filter even though there is not any.
– Fails both on my localhost setup and on the live website example provided.
– I tried sprinkling a few debugging output lines in the plugin. One in particular that confused me was in theclass-templates.phpfile in the functionget_default_template. It was always outputtingstore_locatoras the type for me.
– Also inclass-templates.phpthe functionget_template_detailswas always outputting thebelow_contentvalue for the$used_templatevariable.Not sure if that is helpful with the debugging as I didn’t dig super deep to trace everything and find out if that was even related to the issue, but just something I noticed and thought I should point out in case it does help.
My only other concern is maybe there is something wrong with my template file? Right now I just have one line of PHP in there to test it:
echo 'TESTING';but I have tried copying the default template from the plugin folder and making small changes and that still didn’t seem to change it.Any thoughts or suggestions here?
Look forward to your response, thanks!
The page I need help with: [log in to see the link]
The topic ‘Custom template won’t load’ is closed to new replies.