网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   Blog(博客)/Wiki(维客)/RSS/Cms (https://www.0058.net/forumdisplay.php?f=17)
-   -   wp tag cloud 用法 (https://www.0058.net/showthread.php?t=3060)

car 2008-02-10 10:44 PM

wp tag cloud 用法
 
<?php if ( function_exists('wp_tag_cloud') ) : ?>
<li>
<h2>Popular Tags</h2>
<ul>
<?php wp_tag_cloud('smallest=8&largest=22'); ?>
</ul>
</li>
<?php endif; ?>

字体不一样大,如要一样大,则:

<?php if ( function_exists('wp_tag_cloud') ) : ?>
<li>
<h2>Popular Tags</h2>
<ul>
<?php wp_tag_cloud('smallest=8&largest=8'); ?>
</ul>
</li>
<?php endif; ?>


更多http://codex.wordpress.org/Template_Tags/wp_tag_cloud
http://codex.wordpress.org/Template_Tags

car 2008-02-17 10:55 PM

修改include文件中的widgets.php中的
Code:

function wp_widget_tag_cloud($args) {
        extract($args);
        $options = get_option('widget_tag_cloud');
        $title = empty($options['title']) ? __('Tags') : $options['title'];

        echo $before_widget;
        echo $before_title . $title . $after_title;
        wp_tag_cloud();
        echo $after_widget;


Code:

function wp_widget_tag_cloud($args) {
        extract($args);
        $options = get_option('widget_tag_cloud');
        $title = empty($options['title']) ? __('Tags') : $options['title'];

        echo $before_widget;
        echo $before_title . $title . $after_title;
        wp_tag_cloud('smallest=8&largest=8');        echo $after_widget;



All times are GMT +8. The time now is 10:38 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.