horizonsinc
Forum Replies Created
-
Forum: Plugins
In reply to: [Better Search Replace] Search & Replace within elementor texts?First things first. Take a backup and VALIDATE that it works. Now…
To search and replace links in Elementor managed posts and pages you must modify your search string from what works on ‘normal’ wordpress posts/pages.
Elementor most likely escapes characters used in your find/replace strings such as / or “. For instance let’s say you want to add a trailing slash to links pointing to your contact page site wide. You want to convert https://yoursite.com/contact to https://yoursite.com/contact/
You probably ran update operations like:
Search for: "https://yoursite.com/contact" Replace with: "https://yoursite.com/contact/"This probably worked on any text outside of Elementor and left Elementor content untouched.
The tricky thing is normal posts and pages are NOT escaped the way Elementor posts and pages are stored, PLUS both sets may have both absolute and relative URLs. To make matters worse you may also have http and https links thrown in the mix. To catch all of those possibilities you’ll need to run 11 operations on your posts and postmeta tables.
Normal WP Posts/Pages:
Absolute URLs - Search for: (3 separate operations) "http://yoursite.com/contact" "http://yoursite.com/contact/" "https://yoursite.com/contact" Replace with: "https://yoursite.com/contact/" Relative URLs Search for: "/contact" Replace with: "/contact/"Elementor Posts/Pages:
Absolute URLs Search for: (3 separate operations) \"http:\/\/yoursite.com\/contact\" \"http:\/\/yoursite.com\/contact\/\" \"https:\/\/yoursite.com\/contact\" Replace with: \"https:\/\/yoursite.com\/contact\/\" Relative URLs Search for: \"\/contact\" Replace with: \"\/contact\/\"Seems like certain Elementor widgets can also store without escaping the enclosing quotes so additional operations are needed to change everything:
Absolute URLs Round 2 - Search for: (2 separate operations) "http:\/\/yoursite.com\/contact" "https:\/\/yoursite.com\/contact" Replace with: "https:\/\/yoursite.com\/contact\/" Absolute URLs Round 2 - Relative URLs Search for: "\/contact" Replace with: "\/contact\/"- This reply was modified 6 years, 8 months ago by horizonsinc. Reason: formatting
Please consider giving us an option to use the pro version of font awesome as well!