admin管理员组文章数量:1317894
There's this plugin called media downloader, it works awesome, but I like my WordPress site to be less dependent on dynamic content.
I want the shortcode's dynamic content to be converted to html code programmatically. I know I can copy paste the HTML code using page source. But I need it to be done automatically.
There's this plugin called media downloader, it works awesome, but I like my WordPress site to be less dependent on dynamic content.
I want the shortcode's dynamic content to be converted to html code programmatically. I know I can copy paste the HTML code using page source. But I need it to be done automatically.
Share Improve this question edited Oct 26, 2020 at 12:04 Tom J Nowell♦ 61k7 gold badges79 silver badges148 bronze badges asked Dec 12, 2019 at 7:40 brvnbldbrvnbld 131 silver badge3 bronze badges 1- Are you asking how to transform a string containing a shortcode into a string with the fully processed shortcode in code? Or are you asking how to modify the media downloader plugin? Where exactly do you want to convert the shortcode? Or are you asking how to save the HTML in the database instead of the shortcode tag? I've re-read the question several times and it isn't clear. I'm also editing out the request for a plugin as plugin recommendations are off-topic here – Tom J Nowell ♦ Commented Oct 26, 2020 at 12:03
2 Answers
Reset to default 1This is what WP shortcode gives you. Short code basically generate HTML/Content automatically for you. A WP shortcode might be using some logic in order to generate the right HTML. What you are wanting does not seem to be the right way.
You might consider trying the Block Editor. You can either use the built-in HTML block, or if you want to stay more dynamic, you could build a block specifically for your purposes that takes a few inputs and then outputs the HTML you desire.
本文标签: pluginsIs there a way to convert shortcodes to html content
版权声明:本文标题:plugins - Is there a way to convert shortcodes to html content? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742037091a2417356.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论