Stiofan O'Connor

Forum Replies Created

Viewing 15 posts - 4,276 through 4,290 (of 13,774 total)
  • Author
    Posts
  • in reply to: clone backup copy error #390072

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome! 🙂

    in reply to: the …/me location page (from Near Me button) #390071

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Then grabing the nearest country from the DB is the only solution, (i gave you code for that).

    Stiofan

    in reply to: Get rid of the paralax header for some pages in Supreme #390069

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi mb,

    There is no way to remove it per post type other than maybe CSS, but you can add this meta value “sd_remove_head” = 1 to any post/page and it will remove it for you.

    Thanks,

    Stiofan

    in reply to: Renew #390068

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Abel,

    If you want to change the length you would have to buy a new membership and swap over the licence keys to the new ones, this is a limitation in the sales system we use.

    Thanks,

    Stiofan

    in reply to: WpDatatables – cannot find GD custom fields #390067

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I’m not sure where you are getting that query from but you would need to join the GD details table like

    $wpdb->prefix . "geodir_" . $post_type . "_detail"

    Let me know if you need more advice.

    Thanks,

    Stiofan

    in reply to: Confusion between cities and neighbourhoods in London #390065

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Andrew,

    I am happy to discuss this and hopefully we can find a solution.
    Firstly we are not deciding things, we use the Google API and it has no mention of london when you geocode that area, below is an example return:

    
    
    {long_name: "16", short_name: "16", types: Array(1)}
    1
    :
    {long_name: "Cedar Road", short_name: "Cedar Rd", types: Array(1)}
    2
    :
    {long_name: "Teddington", short_name: "Teddington", types: Array(2)}
    3
    :
    {long_name: "Teddington", short_name: "Teddington", types: Array(1)}
    4
    :
    {long_name: "Greater London", short_name: "Greater London", types: Array(2)}
    5
    :
    {long_name: "England", short_name: "England", types: Array(2)}
    6
    :
    {long_name: "United Kingdom", short_name: "GB", types: Array(2)}
    7
    :
    {long_name: "TW11 9AL", short_name: "TW11 9AL", types: Array(1)}

    There is no mention of just “London”

    Now Google has been known to be wrong in the past but maybe it is correct here, its not officially part of “London” ?

    Stiofan

    in reply to: Activating DIVI Theme presents 502 Bad Gateway Error? #390062

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I just tried to activate DIVI when GD was not active and it still gives me a 502 error, this would seem to be unrelated to GD.

    You should try installing a fresh copy of DIVI and if that does not help you should check the server error log to see what is going wrong.

    Thanks,

    Stiofan

    in reply to: Cannot upload #390061

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have removed your attachment, please only upload it as a private reply if you need it private.

    Stiofan

    in reply to: the …/me location page (from Near Me button) #389934

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    1. the location it grabs is from Google API (this might never be in your DB)

    2. This is from your DB not Google.

    What happens if google returns a country you dont have in the DB?

    The location/me/ page does not have a country set, it could be on the exact border of 3 countries and be showing listing from all 3, so IMO your idea will never work.

    Stiofan

    in reply to: Changing layout on CPT page #389929

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    This reply has been marked as private.
    in reply to: the …/me location page (from Near Me button) #389928

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    There is no way i can think of that this would work with widget logic.

    This is the code to get the nearest city info from the user lat/lon, i’m sure you could adapt it to find the country.

    
    
     $location_info = $wpdb->get_results($wpdb->prepare("SELECT *,CONVERT((%s * 2 * ASIN(SQRT( POWER(SIN((%s - (" . POST_LOCATION_TABLE . ".city_latitude)) * pi()/180 / 2), 2) +COS(%s * pi()/180) * COS( (" . POST_LOCATION_TABLE . ".city_latitude) * pi()/180) *POWER(SIN((%s - " . POST_LOCATION_TABLE . ".city_longitude) * pi()/180 / 2), 2) ))),UNSIGNED INTEGER) as distance FROM " . POST_LOCATION_TABLE . " ORDER BY distance ASC LIMIT 1", $DistanceRadius, $mylat, $mylat, $mylon));
    
            if (!empty($location_info)) {
                $location_info = end($location_info);
                $location_array = array();
                $location_array['gd_country'] = $location_info->country_slug;
                $location_array['gd_region'] = $location_info->region_slug;
                $location_array['gd_city'] = $location_info->city_slug;
                $base = rtrim(geodir_get_location_link('base'), '/');
                $redirect_url = $base . '/' . $location_info->country_slug . '/' . $location_info->region_slug . '/' . $location_info->city_slug;
    
                    $args_current_location = array(
                        'what' => 'city',
                        'country_val' => $location_info->country,
                        'region_val' => $location_info->region,
                        'city_val' => $location_info->city,
                        'compare_operator' => '=',
                        'no_of_records' => '1',
                        'echo' => false,
                        'format' => array('type' => 'array')
                    );
                    $current_location_array = geodir_get_location_array($args_current_location);
                if(isset($current_location_array[0])){
                    $redirect_url =  $base.'/'.$current_location_array[0]->location_link;
                }
                $redirect_url = geodir_location_permalink_url($redirect_url);
           }

    Stiofan

    in reply to: Restrict google map autocomplete to one country #389926

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes, this is what i mean, at the moment it does not limit it to the default country, but my change will, if you provide wp-admin details i will apply the patch to your site.

    Thanks,

    Stiofan

    in reply to: Changing layout on CPT page #389923

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    This reply has been marked as private.
    in reply to: the …/me location page (from Near Me button) #389922

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    There is no easy way to do this, the best solution i can think of for you is to instead of having options #1 or #2 to just use #2 and never #1.

    Stiofan

    in reply to: Page Not Found #389920

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Norman,

    Please try the following:
    #1 WP>Permalinks>Save
    #2 GD>GD Tools>GD pages check

    If none of those work, please provide wp-admin details in a private reply and i will take a look.

    Thanks,

    Stiofan

Viewing 15 posts - 4,276 through 4,290 (of 13,774 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount