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.