How to omit some tags from all_tags?

I know I can show all blog tags with all_tags in the side area of my blog site.

Is there a way to omit some tags from this list? (The omitted tags I'd rather like to list as (manually added) page links - as broad categories.)

Asked 5 months ago • Improve this question
5 replies

You could use some CSS to accomplish this, e.g.

{{#all_tags}}
<span class="tag-{{slug}}">...</span>
{{/all_tags}}

<style>
.tag-apple,
.tag-pear {display:none}
</style>

Would that work?

Answered 5 months ago · Improve this answer

Smart idea! I think this will work. - Will try it soon.

Answered 5 months ago · Improve this answer

The trick works well for hiding marked tags. Thanks heaps!

Can use a similar trick to do the oppsite as well? Only show the tags I mark in CSS?

I tried :

...
<span class="hide-always" class="show-tag-{{slug}}">
...

with the CSS:

.hide-always {display:none}

.show-tag-apple,
.show-tag-pear {display:block}

but it doesn't seem to be possible to "overwrite" the first class with the second...

Answered 4 months ago · Improve this answer

The double class attribute is likely causing a problem. Try this instead:

<span class="show {{slug}}">...</span>
.show {display:none}

.show.apple,
.show.pear {display:block}
Answered 4 months ago · Improve this answer

Cool. Will try this. Thanks.

Answered 3 months ago · Improve this answer

Markdown allowed

Question or feedback?

Contact us
How to password-protect a site? Thumbnails on social media? Title in menu vs title on page? Home Page Alt Text for Images

On this page