內容簡介
允許作者設置其位置,然後在 Google 地圖上顯示。
添加一個樣板標籤:<?php al_list_authors(); ?>,提供以下可用參數:
include_protected_posts=1:在計算最新文章時包括受保護的文章。
echo=1:是將地圖和列表寫入頁面還是返回它(這樣您可以將 HTML 分配給變量)。
HTML 輸出相當具有類別,可用於輕鬆的 CSS 樣式設置,但如果您需要自適應,您可以創建一個名為「view」的目錄,再創建一個名為「author-listings」的目錄。然後將佈景主題目錄中的「view/author-location/」中的模板檔案複製到您的佈景主題目錄中,並根據您的需要進行修改。如果這些檔案在您的佈景主題目錄中的這些目錄中存在,則它們將覆蓋佈景主題目錄中的那些檔案。這很好,因為這意味著當您更新外掛時,您可以簡單地覆蓋舊的外掛目錄,因為您沒有更改任何檔案。感謝 John Godley 提供這種神奇的代碼。
外掛最初是代表 Puffbox 製作的。
如果這個外掛缺少您需要的功能嗎?我很樂意接受功能贊助: 聯繫我,我們可以討論您的想法。
任何問題: 聯繫我。
外掛標籤
開發者團隊
原文外掛簡介
Allows authors to set their location, and then display it on a Google Map.
Adds a template tag: with the following available arguments:
include_protected_posts=1 : Include protected posts when calculating the latest post.
echo=1 : Whether to write the map and listing into the page, or return it (so you can assign the HTML to a variable).
The HTML output is fairly heavily classed, for ease of CSS styling, but if you need to adapt it you can. Create a directory in your theme called “view”, and a directory within that one called “author-listings”. Then copy the template files from view/author-location/ in the plugin directory into your theme directory and amend as you need. If these files exist in these directories in your theme they will override the ones in the plugin directory. This is good because it means that when you update the plugin you can simply overwrite the old plugin directory as you haven’t changed any files in it. All hail John Godley for the code which allows this magic to happen.
Plugin initially produced on behalf of Puffbox.
Is this plugin lacking a feature you want? I’m happy to accept offers of feature sponsorship: contact me and we can discuss your ideas.
Any issues: contact me.
