I am calling my tag cloud on a wordpress page (literally a page, edited in the dashboard) with the code:
which should show all tags separated only by whitespace, but instead I am getting all tags separated by an html BR tag. How can I get rid of the line breaks?
I’m also having this problem. Using WP2.3 and the default tag call.
Any help would be appreciated.
wp_tag_cloud doesn’t add BR tags. But..
(literally a page, edited in the dashboard)
You’re using something like RunPHP aren’t you? Well, don’t do that. Page content is automatically reformatted to be HTML friendly. While wp_tag_cloud only outputs newlines, WordPress will convert those to BR’s when they occur in Post or Page content.
Instead of using RunPHP and other hacks, create a Page Template and put your PHP code there. Then use that Page Template for your Page instead.
Indeed, I’m using exec-php. That sucks since I don’t really want to create 200 different if/then statements for all the php I use in posts and pages.
Does anyone know of a “new” tag plugin that isn’t going to screw things around?
(I never had any hassles with UTW in the past. It’ll be hard to go back.)
I misunderstood you. (Damn text-based communication!)
One can still run php plugins but one cannot run
<?php wp_tag_cloud(''); ?>within the page.
One more page template isn’t too much of a problem though 🙂
Now running on http://www.indietravelpodcast.com/tags
I had the same problem. I wanted to continue to use runPHP so wrote a very simple plugin that filters out the \n’s created by wp_tag_cloud and replaces them with spaces. The
You can grab the plugin here:
I would suggest that maybe for a future version of WordPress, the main code could use a space instead of a /n for separating the tags.
- The topic ‘Tag Cloud has HTML Line Breaks after Each Tag?’ is closed to new replies.