Tuesday, July 23, 2013

How to search a wordpress database for shortcodes

MySQL can regex sweetness!

here is how to search wordpress posts for shortcodes today we are searching for the shortcode

[auction startbid:250] or [auction startbid:100] etc so we can use regex to find all the shortcodes with various amounts.

select * from wp_posts where
post_content   REGEXP  '\[auction startbid:[0-9]+\]'


Stumble Upon CodePyro

1 comment:

Anonymous said...

Encrusted along with 533 amazing reduce rolex replica diamonds with eye associated with two rolex replica emeralds, the actual cat sleeping along with the actual rolex replica sale can make this particular replica watches one of the most bold high jewelry wrist replica watches for girls. The actual 9981 rolex replica motion beneath the stunning replica watches sale is really exactly the same 1 replica watches uk in the actual.

Post a Comment