內容簡介
這個外掛實現了一個小工具,可以顯示不同的、由頁面控制的 RSS 源。我想要的是在頁面上顯示最後 x 次外掛評論,並帶有外掛信息。
為此,我為每個頁面新增了一個額外的字段,可以存儲外掛相關的 ID。然後,小工具將使用這個 ID 來替換 RSS 源中的 @ID@ 標記。
範例
頁面 RSS ID:gps-map-widget
小工具 RSS 源:https://wordpress.org/support/rss/view/plugin-reviews/@ID@
結果:鏈接中顯示的是 RSS 源 https://wordpress.org/support/rss/view/plugin-reviews/gps-map-widget 中的最新文章
當頁面的 RSS ID 为空時,也可以使用默认标题和 RSS 源。
替代使用方法
默認情況適用於外掛的使用。但是.. 您也可以在小工具設置中更改 RSS 源為僅包含 @ID@,並在每個頁面中添加完整的源 URL,從而在每個頁面上獲得完全不同的 RSS 源。
我會將這個小工具和 WooSidebars (https://wordpress.org/plugins/woosidebars/) 一起使用,這樣我就可以輕松控制小工具的位置。
外掛標籤
開發者團隊
原文外掛簡介
This plugin implements an widget which can show a different, page controled, rss feed. What I wanted was the last x plugin reviews on the page
with the plugin info.
For this I added an extra field to every page in which an plugin related id can be stored. This id then will be used by the widget to
replace the @ID@ marker in the rss feed.
example
page rss id: gps-map-widget
widget rss feed: https://wordpress.org/support/rss/view/plugin-reviews/@ID@
result: the last posts in the feed https://wordpress.org/support/rss/view/plugin-reviews/gps-map-widget
When the page rss id is empty, there’s also a default title and rss feed to use.
alternative use
The defaults are for use with the plugins. But.. You can also change the rss feed in the widget settings to only @ID@ and add a
complete feed url to every page resulting in a complete different feed on every page.
I use this widget together WooSidebars (https://wordpress.org/plugins/woosidebars/) so I can easy controle where the widget ends up..
