• Resolved gastronomicslc

    (@gastronomicslc)


    I’ve not used the plugin in some time. A blocker for me was the ability to activate user tracking on a per page/post basis. I remember it being noted this was a planned feature. Has this been implemented at this time? My use case would be to ask users for their location on an auto basis if they hit the site via the homepage – but *not* if they hit posts/pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @gastronomicslc,

    I apologize for not replying sooner.

    I believe I remember our conversation regarding this matter. I mentioned that I will add a filter to the plugin that will allow you to limit the auto locator feature to specific features.

    If that’s what you are looking for, then you should be able to use the script below. You only need to change the value “10” in the array to the ID of the page/s where you wish to load the auto locator feature.

    function gmw_disable_auto_locator_on_specific_pages( $localize, $options ) {

    // List of page IDs where locator should be enabled.
    if ( is_page( array( 10 ) ) ) {

    $localize['settings']['general']['auto_locate'] = 1;

    } else {

    $localize['settings']['general']['auto_locate'] = 0;
    }

    return $localize;
    }
    add_filter( 'gmw_localize_options', 'gmw_disable_auto_locator_on_specific_pages', 10, 2 );

    I hope this helps.

    Thread Starter gastronomicslc

    (@gastronomicslc)

    Thanks, I appreciate it! ??

    Plugin Author Eyal Fitoussi

    (@ninjew)

    You are very welcome, @gastronomicslc.

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