• Hi, I’ve followed the directions exactly like the documentation, but it just won’t show. I’m using a child theme of Kadence.

    In order to try different things, I tried:

    get_stylesheet_directory_uri() to see if that would work.

    ‘path’ => get_stylesheet_directory_uri() . ‘/wpsl-templates/custom.php’

    ‘path’ => get_stylesheet_directory() . ‘/wpsl-templates/custom.php’

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, thank you for writing.

    Could you please provide the code snippet you are using in your functions.php file to load the custom template? And also, if you can share the URL of your website, maybe there is something I can spot. Many thanks!!

    Thread Starter voodoocreative

    (@voodoocreative)

    Hi,

    add_filter( ‘wpsl_templates’, ‘custom_templates’ );

    function custom_templates( $templates ) {

    /**
     * The 'id' is for internal use and must be unique ( since 2.0 ).
     * The 'name' is used in the template dropdown on the settings page.
     * The 'path' points to the location of the custom template,
     * in this case the folder of your active theme.
     */
    $templates[] = array (
        'id'   => 'custom',
        'name' => 'Custom template',
        'path' => get_stylesheet_directory() . '/' . 'wpsl-templates/custom.php',
    );
    
    return $templates;

    }

    and my file structure is /child-theme/wpsl-templates/custom.php

    I can’t provide the link in a public forum as it’s a protected site.

    Hi again,

    Thanks for the info.

    Just to rule things out, can you check what the output of the get_stylesheet_directory() function looks like? So we can compare it with the actual path of your child theme. Maybe you can echo this function somewhere in your functions.php file.

    Many thanks!!

    Thread Starter voodoocreative

    (@voodoocreative)

    Just did a test with a test.js file in that wpsl-template folder and enqueued the script and the file path was correct in the output. I also do have my template in settings set to Custom template in case that was going to be a question.

    farroyo

    (@farroyob)

    Hi again,

    Well, I must admit that this issue is a bit weird, there must be smething that we are overlooking here. Do you have any cache/optimization plugins that may be interferring with Wp Store Locator? A temporary deactivation could help us rule this out. On the other hand, there is also an option for clearing the store locator transient cache in the plugin settings page, near the end, you can also try clicking that and letting us konw if the issue still persists.

    Best regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.