內容簡介
Hot'n'Cold 外掛會根據 Jetpack 文章瀏覽次數,為每篇文章顯示不同顏色的徽章,區分為「熱門」、「中等」或「冷門」
此外掛需要安裝、啟用並連接到 WordPress.com 帳戶的 Jetpack。
您需要將以下完整代碼添加到主題上,以在想要顯示徽章的位置顯示:<?php shambix_hotposts(200,100,50,true,true,false); ?>
此代碼必須在 Loop 中使用。
您可以使用下列參數自訂代碼:
文章觀看次數達到「熱門」的次數(預設為 200)
文章觀看次數達到「中等」的次數(預設為 100)
文章觀看次數達到「冷門」的次數(預設為 50)
如果是「熱門」,是否顯示徽章?(預設為 true)
如果是「中等」,是否顯示徽章?(預設為 true)
如果是「冷門」,是否顯示徽章?(預設為 false)
我們使用 CSS 文件來設計徽章,因為它們完全由 CSS3 製成,沒有任何圖像,但我們沒有提供任何特定的佈局(浮動、對齊等),這樣你可以自由地使用 hotncold div class 在您自己的主題 style.css 文件中自訂樣式。
如果您喜歡此外掛或想要建議新功能,請在 Shambix 的官方外掛文章下留言。
感謝 Twitter Bootstrap 框架 提供徽章/標籤的 CSS。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Hot’n’Cold shows a different colored badge for every post, depending if the post is “hot”, “medium” or “cold”, based on Jetpack post views
The plugin requires Jetpack to be installed, activated and connected to your WordPress.com account.
The typical/full code that you need to add to your theme, wherever you want the badge to display is
The code MUST be used inside the Loop.
You can customize the code with these parameters, in order:
n. of views for the post to be “hot” (default: 200)
n. of views for the post to be “medium” (default: 100)
n. of views for the post to be “cold” (default: 50)
if “hot”, display badge? (default: true)
if “medium”, display badge? (default: true)
if “cold”, display badge? (default: false)
We use a css file to style the badges, as they are fully made out of CSS3, no images, however we don’t provide any specific layout (floating, alignment, etc), that way you are free to customize them the way you want, by using the div class hotncold in your own theme style.css
If you like the plugin or want to suggest a new features, feel free to drop a comment at the official plugin post on Shambix.
Credits to the Twitter Bootstrap Framework for the badges/labels’ CSS.
