• Resolved tractanz

    (@tractanz)


    Hi there,

    I have used the wpsl_js_settings filter to hide the start marker as per the documentation – https://wpstorelocator.co/document/hide-start-marker/

    This hides the marker, but I’m getting a console error below:

    Here is the code I used from the docs page:

    // -- Hide start marker
    add_filter( 'wpsl_js_settings', 'custom_js_settings' );
    function custom_js_settings( $settings ) {
        $settings['startMarker'] = '';
        return $settings;
    }

    Any help would be much appreciated!

    Cheers,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there!

    You don’t have to worry about that, that behaviour is expected but it is not harmful in any way.

    The way the code snippet works, it just modifies the expected file name for the start marker to an empty string, so instead of

    mydomain.com/wp-content/plugins/wp-store-locator/img/markers/start.png

    The code snippet “deletes” the “start.png” part of the url, so the plugin now tries to load

    mydomain.com/wp-content/plugins/wp-store-locator/img/markers/

    Which is a folder, so it just triggers a 403 (forbidden) error.

    As I said, maybe not super-elegant, but it works and it is not harmful.

    Regards,

    Thread Starter tractanz

    (@tractanz)

    Hey @farroyob,

    Thanks for the explanation, really appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide start marker function error’ is closed to new replies.