I deleted the store-listings-below.php template and now it pulls in the default template, or the custom one I did.
But will the “stores listings below” template be used if the plugin updates? How can this be fixed?
Thanks.
It will not recognize my custom template. I put a different html comment in the default template and custom template and it is definitely only using the default template.
The default template has <!-- default template --> at the start and the custom template has <!-- my template --> at the start so I can tell the difference.
I’ve tried selecting the custom template in the settings and in the shortcode on the page. Still, it uses the default template.
I’d really like to customize the listings in the search results, but I can’t even get the custom template to work.
Can you share the code you’re using to load the custom template in a gist?
Can you test this with a default WP theme?
You’re 100% sure the wpsl-templates/custom.php exist in your theme folder?
Currently, I am using Genesis with a child theme (Elegance).
I switched to twentyseventeen and added the code to the function file. It works:
http://www.columbusohioecommerce.org/maptest/
I can see the <!--mytemplate--> comment in the code.
Guess it could be something in Genesis? Or the child theme?
So I switched to a different Genesis child theme (Modern Studio) and it went back to using the default template instead of the custom template.
So it’s something related to Genesis. Any ideas?
Ah, I think the issue is with the child theme path.
Try to replace get_template_directory with get_stylesheet_directory in the code to load the template, that will likely fix it.