Hi @covacs77
There is some processing that happens for certain characters in custom XML exports, including changing square brackets to **OPENSHORTCODE** and **CLOSESHORTCODE**. This is done so that there’s no interference with snippets/functions.
Please try the following code for this:
function corrige_referencia ($ref) {
return str_replace ("**OPENSHORTCODE**vc_column**CLOSESHORTCODE**", "", $ref);
}
It works, it’s so cool!!!
I also found that the shortcode in which the parameters are passed does not want to be removed [vc_column width = “1/4”], it’s all because of the quotes. This is solved by using special symbols.
<?php
function corrige_referencia ($ref) {
return str_replace ("**OPENSHORTCODE**vc_column width="1/4"**CLOSESHORTCODE**", '', $ref);
}
?>
Thank you again for your universal plug-in.
Hi, @covacs77 I developed a plugin to easily Clean up your WordPress content from unused broken shortcodes.
Download from here: https://wordpress.org/plugins/shortcode-cleaner-lite/
It provides An easy way to clean up unused, broken shortcodes from WordPress content automatically, so you can switch between themes and plugins without worrying and keep your content cleanly and fresh all the time, it is dealing with any theme (Divi, Avada..etc) shortcodes that are left when changing themes or plugins or page builders (Visual Composer, Elementor, Beaver…etc).
I hope it will be useful to solve this issue.
its not working for me, do you i am not able to change any string ( even simple text) on my csv being export. I add this function to replace a word ni the settings / function editor area:
function replace_text($text) {
$text = str_replace('oldword', 'replace-with-this-string', $text);
return $text;
}
add_filter('the_content', 'replace_text');
But nothigng change in the csv . . . . am i missing a step or anything else ?
Thanks for all . .
-
This reply was modified 6 years, 1 month ago by tibewww.
Where can i insert this Function?
Into our theme functions.php file?
Thanks.