Linux 软件免费装
Banner图

Advanced Custom Fields: Leaflet Map Field

开发者 unscuzzy
更新时间 2018年7月5日 05:04
捐献地址: 去捐款
PHP版本: 5.6 及以上
WordPress版本: 4.9.6
版权: GPLv2
版权网址: 版权信息

标签

plugin wordpress acf leaflet

下载

1.0

详情介绍:

This plugin adds a Leaflet map field to the Advanced Custom Fields plugin. Create the backend field You can add a leaflet map field using ACF like the Google Map field. Diplay the map in front-end Uses the classic ACF get_field('field_name') function to get field data (lat, lng, address & zoom). Warning, the get_field() function does not display the map itself, for this, use the leaflet js map documentation directly Compatibility This ACF field type is compatible with:

安装:

From your WordPress dashboard
  1. Visit Plugins > Add New
  2. Search for “Advanced Custom Fields: Leaflet Field”
  3. Activate "Advanced Custom Fields: Leaflet Field" from your Plugins page
  4. Create ACF new leaflet map field from "Custom Fields" menu item

屏幕截图:

  • Backend field settings
  • Backend field example
  • Front-end output

常见问题:

How to display the map in front-end ?

  1. Make sure you have created a "Leaflet Map" field
  2. In the template file, use the ACF classic "get_field()" function, (you can add this following code in your template page for debug)
  3. <?php var_dump( get_field('my-field-name') ); ?>
  4. Go to leaflet map documentation and draw your 1st map!

更新日志:

1.0.0