How to identify in a shortcode if it's rendered on a list template or in a single template?

You cannot.

I would either:

  • Add the HTML element before or after .Content in the template, OR

  • Handle this with CSS

1 Like