I’m wanting to build a shortcode for my theme that allows me to show a gallery of images/videos. I’m thinking the markup might be something like:
{{<gallery>}}
{{<figure src="..." ...>}}
{{<figure src="..." ...>}}
...
{{</gallery>}}
What I’m hoping I can do is have the figure
shortcode be aware that it’s inside a gallery and therefore behave differently to normal. I’m already using a custom figure
shortcode to provide responsive images but I don’t know if I can discover the context that it’s called in.
Thanks
Adam