WordPressでタグクラウドのフォントサイズを変更
Posted on 12月 18, 2009
wordpressのタグクラウドを、 wp_tag_cloud(); で表示させてる場合はパラメータを渡せばフォントサイズを変更できるのですが ウィジェットで表示させてる場合はphpファイルを弄る必要がありそうです。 w […]
wordpressのタグクラウドを、
wp_tag_cloud();
で表示させてる場合はパラメータを渡せばフォントサイズを変更できるのですが
ウィジェットで表示させてる場合はphpファイルを弄る必要がありそうです。
wp-includes/category-template.php
を変更します。
//521行目あたり function wp_tag_cloud( $args = '' ) { $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC', 'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true );
この部分の
smallest = 最小サイズ
largist = 最大サイズ
となるので、この部分を適当な値に変更すればOKです。
Add Comment
[…] | タグクラウド 参考https://design-spice.com/2009/12/18/wordpress-tag-cloud-font-size/ wp-includes/category-template.phpを変更します。 1 2 3 4 5 6 7 //521行目あたり function […]