• Trying to use the geo filter for the UK but I cant seem to get it to work. Im using it on a separate page mydomain.com/where-to-buy-uk and I have placed the below in the functions file:

    add_filter( ‘wpsl_geocode_components’, ‘custom_geocode_components’ );

    function custom_geocode_components( $geocode_components ) {

    if ( is_page( ‘where-to-buy-uk’ ) ) {
    $geocode_components[‘country’] = ‘uk’;
    }
    else if ( is_page( ‘where-to-buy-germany’) ) {
    $geocode_components[‘country’] = ‘de’;
    }

    return $geocode_components;
    }

    Can anyone advise where I’m going wrong?

    • This topic was modified 7 years, 11 months ago by creativ3y3.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘geo filter not working’ is closed to new replies.