标签云是很多wordpress主题都有的一个主题元素,上一篇wordpress教程中,我们已经向大家介绍了的方法。很多站长在的过程中,想要给主题添加彩色标签云功能,包括边栏调用和页面调用,今天我们就向大家介绍一下实现的方法。
1.调用标签云
我们可以使用 wp_tag_cloud() 函数实现标签云的调用。比如下面的样例:
Crayon-5c891cc245e07970312099" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-mixed-highlight" title="Contains Mixed Languages">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-language">PHPCrayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">
Crayon-nums " data-settings="show"> Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line="Crayon-5c891cc245e07970312099-1">1 | Crayon-code">
Crayon-nums " data-settings="show"> Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line="Crayon-5c891cc245e11418149858-1">1 Crayon-num" data-line="Crayon-5c891cc245e11418149858-3">3 Crayon-num" data-line="Crayon-5c891cc245e11418149858-5">5 Crayon-num" data-line="Crayon-5c891cc245e11418149858-7">7 Crayon-num" data-line="Crayon-5c891cc245e11418149858-9">9 Crayon-num" data-line="Crayon-5c891cc245e11418149858-11">11 Crayon-num" data-line="Crayon-5c891cc245e11418149858-13">13 | Crayon-code">
Crayon-nums " data-settings="show"> | Crayon-code">
Crayon-nums " data-settings="show"> Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line="Crayon-5c891cc245e16478849262-1">1 | Crayon-code">
Crayon-nums " data-settings="show"> Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;"> Crayon-num" data-line="Crayon-5c891cc245e17838471915-1">1 | Crayon-code">