Components added in layout via shortcodes don’t get mounted
See original GitHub issueHi, I’m using the elderjs/image plugin and I can’t figure out how to render the picture element in my svelte component
this is my component
<script lang="ts">
export let helpers;
</script>
<style lang="scss">
img {
margin: 0.2rem;
max-height: 4.5rem;
padding: var(--spacing-0);
@media (max-width: 40em) {
max-height: 3rem;
padding: 0;
}
}
</style>
<a href={helpers.permalinks.home({slug: '/'})}>
{
@html helpers.shortcode({name: 'picture',props:{src:'/img/logo.png'}})
}
<!-- {@html helpers.picture('/img/logo.png', {maxWidth: 2000, class:'', alt: ''})} -->
</a>
and this is being rendered instead {{picture src=‘/img/logo.png’/}}
I also tried the helpers.picture way but I’m getting helpers.picture is not a function error message If I do that.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Understanding WordPress shortcodes | Layout - Flywheel
Step 1: add the shortcode in your theme's functions.php file. You'll be using the add_shortcode function to give your shortcode a name, and...
Read more >Using Shortcodes for Custom Elements - Pixelgrade
To check if you have it, go to the Plugins section of your website or click on the Pixelgrade tab, scroll down to...
Read more >How to Use WordPress do_shortcode
Extend your site's functionality through WordPress do_shortcode function. In this article, we will show you how to apply it!
Read more >Use shortcodes in your layouts | Beaver Builder Knowledge ...
You can insert Beaver Builder layouts as shortcodes into any text or text editor field, just like you do for any other WordPress...
Read more >How To Add Shortcodes In Divi - Tutorial by Pee-Aye Creative
The Best Way To Add Shortcodes In your Divi Layout ... but you are using the Divi Theme and don't know how to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nickreese Thanks for fixing it so quickly 👏 ,I updated elder.js and tried the image plugin shortcode and it’s working now.
@NK-WebDev this was fixed in v1.1.6 that was just published.