wordpress主題標(biāo)簽大小及標(biāo)簽顯示數(shù)量的方法
使用場景
由于大部分主題都沒有對標(biāo)簽數(shù)量屬性等字段進行定制化修改,所以直接引用WP默認的標(biāo)簽函數(shù)直接調(diào)用,例如主題巴巴的所有主題,都沒有進行標(biāo)簽數(shù)量等控制,所以今天為大家?guī)泶似?a href="http://www.vw92.cn/dnj/" target="_blank" >教程修改默認配置。文章源自玩技e族-https://www.playezu.com/189537.html
修改 wordpress 標(biāo)簽云方法
文件路徑:打開 wp-includes/category-template.php 搜索 wp_tag_cloud 找到712行修改數(shù)量。文章源自玩技e族-https://www.playezu.com/189537.html
文章源自玩技e族-https://www.playezu.com/189537.html
具體的參數(shù)說明:
1. smallest – 定義標(biāo)簽的最小字號,默認為 8;文章源自玩技e族-https://www.playezu.com/189537.html
2. largest – 定義標(biāo)簽的最大字號,默認為 22;文章源自玩技e族-https://www.playezu.com/189537.html
3. unit – 設(shè)置字號類型,如 “pt” 或 “px” 等,默認為 “pt” 類型;文章源自玩技e族-https://www.playezu.com/189537.html
4. number – 設(shè)置標(biāo)簽云數(shù)量,默認顯示 45 個標(biāo)簽;文章源自玩技e族-https://www.playezu.com/189537.html
5. orderby – 設(shè)置按 “name” 或 “count” 排序,默認為 “name” 方式;(注:orderby=count 表示按照標(biāo)簽使用次數(shù)排列)文章源自玩技e族-https://www.playezu.com/189537.html
6. order – 設(shè)置按 “DESC” 或 “ASC” 升降序排列,默認為 “ASC” 升序。文章源自玩技e族-https://www.playezu.com/189537.html
三。按需修改 wp_tag_cloud 函數(shù)的具體參數(shù)即可實現(xiàn)標(biāo)簽云的自定義。文章源自玩技e族-https://www.playezu.com/189537.html
四。將修改好的category-template.php文件上傳到空間中替換原文件即可。
版權(quán)聲明:
本站所有文章和圖片均來自用戶分享和網(wǎng)絡(luò)收集,文章和圖片版權(quán)歸原作者及原出處所有,僅供學(xué)習(xí)與參考,請勿用于商業(yè)用途,如果損害了您的權(quán)利,請聯(lián)系網(wǎng)站客服處理。