Jump to content

Creating administrative or "private" tags for internal control (like "Featured Post" toggle, but more flexible)

Recommended Posts

Site URL: https://www.rushofitall.com/

I used this code (from @Andrius, in another question) to hide tag display at the bottom of blog posts:

.blog-meta-item--tags {
  display: none;

This works, but I wonder how I might take it a step further and only hide certain tags.  Even better if this could work with a wildcard, so only tags with a certain prefix would be hidden (like the "#private" tags available in Ghost).  What I'm really looking for is a way to make a set of administrative tags that never show, while also still being able to use topical tags the way they're intended.

Here's a current use case for this.  I have summary block on my homepage (www.rushofitall.com) to display "Featured" posts from one of my blogs, but those featured posts include some that have a thumbnail photo and others that don't, and the two don't look right intermingled.  So I've tagged the featured posts that have thumbnails (with "thumb"), filtered the summary to show only those with that tag, and hidden the tags with the above code.

This works, but it means I can't use tags in the usual way. (And it seems there are probably other use cases for something like this.)

So is there a way to put something like an if-then into that code above? Something like "IF Tag = #* THEN display:none" (could be # or some other prefix plus a wildcard so you could make many of them if you wanted).

Or some other way to accomplish this?

Thanks, Jeff

Link to comment
  • Replies 0
  • Views 275
  • Created
  • Last Reply


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.