Let's say I have a web component called
<x-interaction>. I want to pass the ID of the post to the web component as an attribute, so I write a shortcode to render the ID.
In the post I write the following:
<x-interaction postid=[get_the_id]> <span slot="title">This is slotted content</span> </x-interaction>
So far, so good.
But the shortcode isn't rendered on the page. The shortcode appears verbatim in the rendered HTML.
I want this:
But I get this:
As an experiment, I removed the hyphen from the tag name, and the shortcode renders appropriately:
This seems to be related to the hyphen in the web component tag name. Or something else with Wordpress and web components that I don't know.