How to display tag cloud without links

We can modify the output with the filters wp_tag_cloud or wp_generate_tag_cloud. But we could also use: echo strip_tags( wp_tag_cloud( ‘echo=0&smallest=10&largest=10&number=0&format=list’ ), ‘<ul><li>’ ); where we strip all the HTML tags from the output, except the ul and li tags. Notice that we added the echo=0 parameter as mentioned in the Codex as a way to … Read more

Individual css class for each tag in wp_tag_cloud

try this code: add_filter ( ‘wp_tag_cloud’, ‘tag_cloud_font_size_class’ ); function tag_cloud_font_size_class( $taglinks ) { $tags = explode(‘</a>’, $taglinks); $regex1 = “#(.*style=”font-size:)(.*)((pt|px|em|pc|%);”.*)#e”; $regex2 = “#(style=”font-size:)(.*)((pt|px|em|pc|%);”)#e”; $regex3 = “#(.*class=”)(.*)(” title.*)#e”; foreach( $tags as $tag ) { $size = preg_replace($regex1, “(”.round($2).”)”, $tag ); //get the rounded font size $tag = preg_replace($regex2, “(”)”, $tag ); //remove the inline font-size style … Read more

display tag slug as class per link in tag cloud

one possible way: add a filter in functions.php of your theme: add_filter ( ‘wp_tag_cloud’, ‘tag_cloud_slug_class’ ); function tag_cloud_slug_class( $taglinks ) { $tags = explode(‘</a>’, $taglinks); $regex = “#(.*tag-link[-])(.*)(‘ title.*)#e”; foreach( $tags as $tag ) { $tagn[] = preg_replace($regex, “(‘$1$2 tag-‘.get_tag($2)->slug.’$3’)”, $tag ); } $taglinks = implode(‘</a>’, $tagn); return $taglinks; }

Combining tags from post types

As John said in his comment, you have two taxonomies with separate terms. If both posts and portfolios are to share tags, instead of using a new taxonomy just extend post_tags to portfolio custom post type : register_taxonomy_for_object_type( ‘post_tag’, ‘portfolio’ );

How to run WordPress across 2 VMs for high availability

The Bad News: The core open source base of WordPress does make quite a few assumptions about being run on a single server (wp-content, user uploads and media library to name a few) The Good News: Pretty much all cloud providers (including Azure) have abstractions that allow you to work around these design limitations. Fundamentally, … Read more