How to hide posts from your blog depending on tags
Tutorial by @dontbragā
Difficulty: ā ā āāā
The only reason this is 2 stars is because you have to know your way around your own theme / be able to find things in your theme.
In this tutorial I am going to explain to you how to hide posts from your main blog page via tags.
WARNING:
This only hides posts. Meaning that if you hide 3 posts and your theme has 10 posts per page and you use pagination, only 7 posts will show on that page. It also means that if you use infinite scroll and hide 6 or more recent posts, it could temporarily prevent your infinite scroll from triggering, so don't tag too many things in a row!
Step 1:
Find what your posts are labeled. My themes are wrapped within <article>. However yours might be under <div class=āentryā>, <div class=āpostsā> orĀ <div id=āpostsā>. Whatever it is, it should be just below {block:Posts}
To this you need to add the variable {TagsAsClasses}. Examples:
If you would like your posts to only show in your archive, go to StepĀ 2a.
If you would like your posts to show on search and tag pages, got to Step 2b.
Step 2a:
Add the css that will make the posts hidden everywhere but permalink pages and your archive. For this example I will be making this work for the tag #dontshow (so if you tag a post with #dontshow it wonāt show on your blog).
Add the css that will make the posts hidden on your home page. For this example I will be making this work for the tag #dontshow (so if you tag a post with #dontshow it wonāt show on your blog).