CMS Development

webwarriors
Contributor | Partner
Contributor | Partner

Blog Tag Cloud

SOLVE

Hi there,

 

We're wanting to create a tag cloud for blogs. Does anyone know how to even get started with something like this?

 

Cheers

0 Upvotes
1 Accepted solution
webwarriors
Solution
Contributor | Partner
Contributor | Partner

Blog Tag Cloud

SOLVE

Actually, I think I may have found a solution:

<div id="tag-cloud">
<h3>Tags</h3>
{% set my_tags = blog_tags('default', 10000) %}
<ul class="cloud" role="navigation" aria-label="Ucidity tag cloud">
{% for item in my_tags %}
<li><a data-weight="{{item.live_posts}}" href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }} ({{item.live_posts}})</a></li>
{% endfor %}
</ul>
</div>

 

With some CSS thrown over the top:

https://dev.to/alvaromontoro/create-a-tag-cloud-with-html-and-css-1e90

View solution in original post

3 Replies 3
webwarriors
Solution
Contributor | Partner
Contributor | Partner

Blog Tag Cloud

SOLVE

Actually, I think I may have found a solution:

<div id="tag-cloud">
<h3>Tags</h3>
{% set my_tags = blog_tags('default', 10000) %}
<ul class="cloud" role="navigation" aria-label="Ucidity tag cloud">
{% for item in my_tags %}
<li><a data-weight="{{item.live_posts}}" href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }} ({{item.live_posts}})</a></li>
{% endfor %}
</ul>
</div>

 

With some CSS thrown over the top:

https://dev.to/alvaromontoro/create-a-tag-cloud-with-html-and-css-1e90

RandyMilanovic
Participant | Gold Partner
Participant | Gold Partner

Blog Tag Cloud

SOLVE

Works like a charm. Thanks.

webwarriors
Contributor | Partner
Contributor | Partner

Blog Tag Cloud

SOLVE

Thanks Randy - glad we could help!