Created
June 25, 2020 20:37
-
-
Save jamesmthornton/518d1edc66e64a5e59d16cd4f44bf99c to your computer and use it in GitHub Desktop.
Remove a prepended constant from post titles in Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this would remove the following string including a trailing space: [PMC Daily Insight] | |
UPDATE wp_posts | |
SET post_title = | |
MID( post_title, LENGTH('[PMC Daily Insight] ')+1 ) | |
WHERE post_title LIKE '[PMC Daily Insight] %' | |
AND post_type = 'post'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment