I'm making some adjustments to the labels on my blog to ensure that each post has at least two labels.
The concept is that if a post has LABEL 1, it will load one script, otherwise it will load another. However, I've encountered a situation where posts with LABEL 1 end up loading both scripts due to specific requirements for these posts to have an additional label besides LABEL 1.
I know that adding another label would solve the issue, but unfortunately, I can't make this change. Is there a way to stop the execution if the first condition is met (i.e., the post has LABEL 1)?
I've attempted using 'break', but it seems to be ineffective since there isn't a loop in place, just a conditional statement.
<b:loop values='data:post.labels' var='label'>
<b:if cond='(data:post.labels where (label => label.name in [LABEL 1"])).length gt 0'>
// ACTIONS TO TAKE IF POST HAS "LABEL 1"
// IDEALLY, THE CODE SHOULD HALT HERE EVEN WHEN A POST WITH "LABEL 1" HAS ANOTHER LABEL
<b:else/>
// ACTIONS TO TAKE IF POST DOES NOT HAVE "LABEL 1"
</b:if>
</b:loop>