L
L
looker2021-09-22 00:01:03
Yandex maps
looker, 2021-09-22 00:01:03

How to embed i.cards on the site?

Please tell me how to implement the functionality. The site has a directory of organizations, how to add a map to each page of the organization?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Zolin, 2021-09-22
@artzolin

  1. Register and get a Yandex Maps API key
  2. Connect the Yandex Maps script with the key in WordPress usingwp_enqueue_script()
  3. When publishing a post, you need an additional meta field where you will write geo-coordinates (latitude and longitude). Can be done with ACF plugins or Carbon Fields
  4. When displaying a record, you get a field with geo-coordinates, take the example you need from the sandbox , assemble the script and connect it towp_add_inline_script()

Read about displaying multiple labels on one map here

D
denn, 2021-09-22
@iDx

Here is a great plugin . And you don't have to tweak the code. Everything is done through the post editor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question