Last active
July 7, 2017 13:04
-
-
Save jag1989/3613b74bbf69caa93aea845010fd5903 to your computer and use it in GitHub Desktop.
WordPress Shortcode Search
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
select post.ID, meta.meta_value, post.post_content | |
from wp_postmeta as meta | |
inner join wp_posts as post | |
on meta.post_id = post.ID | |
where post.post_content | |
like '%[shortcode_name%' | |
or meta.meta_value | |
like '%[shortcode_name%' | |
and post.post_type != 'revision' | |
group by post.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment