0

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.

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 Oct 26 '20 at 12:03
1

This 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.

1
  • Yes , I know that shortcodes generate content, But I don't want it to generate them each and every time, once it has been generated to html, I want it that Html code to stay,. – brvnbld Dec 13 '19 at 3:12
0

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.

1
  • No bro, the intent is to make it more static. I don't want the shortcodes to burden my website each time the user visits. Maybe if a page is visited first time ,its ok. But why should WordPress generate shortcodes each time the page is viewed. Shouldn't WordPress have an option for that? – brvnbld Dec 13 '19 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.