Conditional shortcode clarification

Hey Cristián, yes, the conditional was applied to each one of the many loops within my front page. I realized the has_tag was only working correctly with the first of those loops.

After testing it for a few days, I feel confident in sharing my solution here in case anyone is curious, but I don’t want to break any forum rules (I can’t remember them!). The solution I came up with is a code snippet in functions.php that creates a custom Gutenberg block using JSON and JS.

All the CSS styling is done separately. You can see the end result here: www.astromono.com

My website works using a child theme of Twenty Twenty-Five, so I don’t know that it works for ALL themes, so that’s why I’m not super keen on sharing it, but if you hit me up in the DMs I can send it and try helping.

I did not think such a simple idea would take me this long to make, but here we are.

1 Like

That’s how it goes sometimes. You did great, looks great.

:slight_smile:

1 Like