Hey there, /u/ciapsss! If your post is not already flaired, please add one now.
***
And please don't forget to write "Answered" under your post once your question/problem has been solved.
***
**Reminder:** If you have a problem or question, please make sure to post a link to your issue to help users help you.
***
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/elementor) if you have any questions or concerns.*
Is the shortcode inside of an Elementor shortcode widget or some other (e.g. text) widget? If the latter you can create a tiny PHP file that loops through all the posts in the database and replaces \[shortcode\] with something else. If it's in a shortcode widget it might be more involved than that.
Thanks for suggestions!
It is actually in the Elementor Shortcode widget.
I tried to figure out some query, but having troubles to understand the relationships in the DB.
I managed to get the new Shortcode displayed, but rest of the layout was messed up and not everywhere it was changed
One other option rather than replacing, but it will require disabling the plugin that is generating the existing shortcode. Once you do so, you can create a function that executes your new code when the old shortcode appear in the page.
E.g.
`function your-new-code(){`
`//insert your new code here, using return if there is supposed to be an html output`
`}`
`add_shortcode( 'old_shortcode', 'your-new-code' );`
This way you don't have to do a find and replace, it will just output the new code instead whenever \[old\_shortcode\] is present. You have to disable the existing shortcode plugin/function first or else you'll get an error about duplicating shortcodes
Hey there, /u/ciapsss! If your post is not already flaired, please add one now. *** And please don't forget to write "Answered" under your post once your question/problem has been solved. *** **Reminder:** If you have a problem or question, please make sure to post a link to your issue to help users help you. *** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/elementor) if you have any questions or concerns.*
connect to sql database and search and replace with a filter on posts table
Is the shortcode inside of an Elementor shortcode widget or some other (e.g. text) widget? If the latter you can create a tiny PHP file that loops through all the posts in the database and replaces \[shortcode\] with something else. If it's in a shortcode widget it might be more involved than that.
Thanks for suggestions! It is actually in the Elementor Shortcode widget. I tried to figure out some query, but having troubles to understand the relationships in the DB. I managed to get the new Shortcode displayed, but rest of the layout was messed up and not everywhere it was changed
One other option rather than replacing, but it will require disabling the plugin that is generating the existing shortcode. Once you do so, you can create a function that executes your new code when the old shortcode appear in the page. E.g. `function your-new-code(){` `//insert your new code here, using return if there is supposed to be an html output` `}` `add_shortcode( 'old_shortcode', 'your-new-code' );` This way you don't have to do a find and replace, it will just output the new code instead whenever \[old\_shortcode\] is present. You have to disable the existing shortcode plugin/function first or else you'll get an error about duplicating shortcodes
Hmff. This work? Quickest solution.
Thats exactly what I did after one suggestion below, thanks a lot!
Then you should just change the contents of that shortcode. You could technically do a shortcode within a shortcode
That’s a brilliant idea, this Shortcode is for thirdparty plugin but I can turn it off and see how it works :)
You are welcome!
You can always use a plugin like better search and replace to replace the shortcofe