• Some locations do not have an address, so longitude and latitude must be entered, such as 25°12’31.6″N 121°41’35.2″E,

    Click on the map directions link, open the Google map, 25°12’31.6″N 121°41’35.2″E, New Taipei City, Taiwan will appear when you go to the location.

    Because City and Country are required, how to click the map directions link, the two values of City and Country will not be captured

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    It’s not possible to just enter 25°12’31.6″N 121°41’35.2″E.

    You could with some code remove the required field check, but then the coordinates will still need be in the is format ‘40.714224,-73.961452’

    How many locations do you have?

    Thread Starter weking

    (@weking)

    I entered 25°12’31.6″N 121°41’35.2″E in the Address column.
    Not in Latitude and Longitude
    Latitude and Longitude still fill in 25.208787, 121.693229

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The address field only accepts a normal address.

    I’m not entirely sure what you actually mean with ‘Because City and Country are required, how to click the map directions link, the two values of City and Country will not be captured’

    You want to create a directions link without the city / country values?

    Thread Starter weking

    (@weking)

    I hope the city and country are not required fields
    In the address field, I can fill in the city and country, as well as the detailed address.
    Thank You.

    Thread Starter weking

    (@weking)

    I hope the city and country are not required fields.
    have code contained in functions.php can try?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Try to add this code to the functions.php inside your active theme folder.

    Thread Starter weking

    (@weking)

    Due to the error in line 4, this code snippet has been disabled:

    The custom_meta_box_fields function cannot be re-declared.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The custom_meta_box_fields function cannot be re-declared.

    Functions need to have unique names. You already used to customize the meta fields it seems.

    If you disable the other code for a second, then it should work.

    What did you customize with the other custom_meta_box_fields function?

    Thread Starter weking

    (@weking)

    Thank you
    Now click on the map direction link to open Google Maps, 25°12’31.6″N 121°41’35.2″E,,
    >>> ,, <<<
    How to eliminate it?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Yes, because that’s the data that you entered in the address column, so that is what will be used.

    The address field should be used for the address, and nothing else. You can set the coordinates yourself in the lat / lng fields, but it requires a different format without the N E and degrees in the input data. So this 51.891028, 4.472641 will work for the coordinates.

    The start location in the directions will however always use the start address, and this can not be changed without modifying the core code.

    Thread Starter weking

    (@weking)

    Thread Starter weking

    (@weking)

    Can give this command?
    return rtrim($meta_fields, “,,”);

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

The topic ‘City and Country fields’ is closed to new replies.