What is this? From this page you can use the Social Web links to save Remove whitespace from wordpress tagcloud to a social bookmarking site, or the E-mail form to send a link via e-mail.

Social Web

E-mail

E-mail It
April 03, 2008

Remove whitespace from wordpress tagcloud

Posted in: Design

I hate whitespace in html code: if I need them I'll use css rules.

so that's a simple plugin edited from this one.
if you need both merge them

PHP:
  1. <?php
  2. /*
  3. Plugin Name: Tag Cloud noWhitespace
  4. Plugin URI: http://www.laboratoriocaffeina.it/design/2008/04/03/remove-whitespace-from-wordpress-tagcloud.html
  5. Description: Makes wordpress dump out a tag cloud without whitespace between each word in tags (edit from http://www.185vfx.com/2007/10/wordpress-tag-cloud-formatting/)
  6. Author: cedmax
  7. Version: 1.0
  8. Author URI:  http://www.dioblog.it
  9. */
  10.  
  11.  
  12. // This just echoes the chosen line, we'll position it later
  13. function tci_kill_breaks($taglist) {
  14.     return str_replace('&nbsp;',' ',$taglist);
  15. }
  16.  
  17. // Now we set that function up to execute when the tag list is generated
  18. add_filter('wp_generate_tag_cloud', 'tci_kill_breaks',50);?>

download, rename to .php, upload to plugin folder and activate

(tested on 2.5)


Return to: Remove whitespace from wordpress tagcloud