Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bennyjoksch

    (@bennyjoksch)

    Or [geoip_detect2_show_if property=”country.isoCode” not_property_value=”US”][gd_listings post_type="gd_event" post_limit="3" add_location_filter="1" sort_by="event_dates_asc" title_tag="h3" layout="3" bottom_pagination="1" skin_id="884" skin_column_gap="30" skin_row_gap="0" category="24"][/geoip_detect2_show_if]

    And [geoip_detect2_show_if property="mostSpecificSubdivision.isoCode" property_value="MO"][gd_listings post_type="gd_event" post_limit="3" add_location_filter="1" sort_by="event_dates_asc" title_tag="h3" layout="3" bottom_pagination="1" skin_id="884" skin_column_gap="30" skin_row_gap="0" category="24"][/geoip_detect2_show_if][/geoip_detect2_show_if]

    Like This?

    Thread Starter bennyjoksch

    (@bennyjoksch)

    Like So ?

    [geoip_detect2_show_if property="mostSpecificSubdivision.isoCode" property_value="MO"][geoip_detect2_show_if property=”country.isoCode” not_property_value=”US”][gd_listings post_type="gd_event" post_limit="3" add_location_filter="1" sort_by="event_dates_asc" title_tag="h3" layout="3" bottom_pagination="1" skin_id="884" skin_column_gap="30" skin_row_gap="0" category="24"][/geoip_detect2_show_if][/geoip_detect2_show_if]

    Thread Starter bennyjoksch

    (@bennyjoksch)

    Hi,

    The website operator told me that this worked worldwide. So if someone from Germany went to the website, he still got the closest events displayed (even if they are only in the USA).

    The setup is unchanged and worked for the last 2 years. The only thing new is the website had a US server move and WordPress Core updates.

    So the goal should be that no matter from where in the world a user accesses the website, the closest events should be displayed.

    This is the result of the lookup

    The function $record = geoip_detect2_get_info_from_current_ip(NULL); returns an object:
    See API: PHP for more information.
    
    Lookup duration: 20.35 ms
    Lookup duration when called for the second time in the same request: 0.0820 ms
    
    Value
    $record->city->name	Hechingen
    $record->mostSpecificSubdivision->isoCode	BW
    $record->mostSpecificSubdivision->name	Baden-Württemberg
    $record->country->isoCode	DE
    $record->country->name	Germany
    $record->location->latitude	48.3515000000000014779288903810083866119384765625
    $record->location->longitude	8.963200000000000500222085975110530853271484375
    $record->location->timeZone	Europe/Berlin

    Except for the country code, name & Timezone, all other information provided are incorrect.

    But it should show now Events that are Closest to the Result and I don’t know why this is not working anymore

    Thread Starter bennyjoksch

    (@bennyjoksch)

    Hi Benjamin,

    thanks for your quick reply. No, I did not have space in the shortcode on the web page.

    This is the code that is generated. Do you know maybe the reason for the inline style “display-none” ?

    If I take that out, something will be displayed :-)`

    <div class="js-geoip-detect-show-if geoip-hidden" style="display: none;" data-options="{&quot;skip_cache&quot;:false,&quot;lang&quot;:[&quot;en&quot;,&quot;en&quot;],&quot;default&quot;:&quot;&quot;,&quot;property&quot;:&quot;mostSpecificSubdivision.isoCode&quot;,&quot;parsed&quot;:{&quot;op&quot;:&quot;and&quot;,&quot;not&quot;:0,&quot;conditions&quot;:[{&quot;p&quot;:&quot;mostSpecificSubdivision.isoCode&quot;,&quot;v&quot;:&quot;mo&quot;}]}}">

    • This reply was modified 2 years, 9 months ago by bennyjoksch.
    • This reply was modified 2 years, 9 months ago by bennyjoksch.
    Thread Starter bennyjoksch

    (@bennyjoksch)

    Also the Plugin Configuration:

    Data Source:

    Maxmind City or Country Database

    General Options (active):

    – Disable caching a page that contains a shortcode or API call to geo-dependent functions.
    – Enable AJAX endpoint to get the information for the current IP even on cached pages.
    – Add JS Helper functions to all pages.
    – Resolve shortcodes (via AJAX).

Viewing 5 replies - 1 through 5 (of 5 total)