
內容簡介
Annonces外掛是一個在 Google 地圖上顯示在 WordPress 網站內張貼的廣告的程式。
短代碼
在頁面中使用以下短代碼顯示 Google 地圖:
[annonces]
過濾器
更改地圖中 infowindow 的元數據
add_filter('set_marker_data', 'mytheme_set_marker_data', 10, 2);
function mytheme_set_marker_data($microdata, $annonce_id) {
// 設定數據
return $microdata;
}
更改地圖上方篩選區塊的標題
add_filter('bloc_filter_title', 'mytheme_set_filter_title', 10, 1);
function mytheme_set_filter_title($filter_title) {
// 設定數據
return $filter_title;
}
樣板
您可以在子佈景主題內創建 single-announces.php 模板,以編輯單一公告頁面:單一公告頁面的程式碼
Advanced Custom Fields
使用 ACF (Advanced Custom Fields) 外掛,您可以創建或匯入個性化的公告欄位。
按照上面的說明編輯樣板。
您將獲得適合您項目的自定義公告欄位。
開發者團隊
📦 歷史版本下載
原文外掛簡介
Annonces display announces posted in your WordPress interface on a Google map.
Shortcodes
Display the Google Map in a page with the shortcode :
[annonces]
Filters
Change metadatas in infowindow of map
add_filter('set_marker_data', 'mytheme_set_marker_data', 10, 2);
function mytheme_set_marker_data($microdata, $annonce_id) {
// datas
return $microdata;
}
Change title of filter bloc over the map
add_filter('bloc_filter_title', 'mytheme_set_filter_title', 10, 1);
function mytheme_set_filter_title($filter_title) {
// datas
return $filter_title;
}
Template
You can create single-announces.php in your child theme to edit the single page of announce : code for the single-annouce.php
ACF
Width the ACF plugin, you can create or import fields to personalize your announces.
Edit the templates as explain above.
You will obtain custom announces which will suit your project
