We’ve all had those days when we’ve decided that we needed to remove an old plugin, but we need to figure out where that plugin might be in use before we can figure out how to solve the issues that were supposed to be solved by that old plugin. In a lot of cases, this means dealing with a plugin that implements a shortcode (for instance, you want to replace Dagon Design Form Mailer with something like GravityForms), but you’re not sure where to start looking for any posts or pages that use the current plugin.
The solution is actually very simple. When searching for a post or page in the WordPress admin area, WordPress does not run the content through any of the front-end filters, so you can actually just search for the shortcode. If you need to figure out where the old Dagon forms might be in your site, you simply go to All Posts (or All Pages, or whatever) and enter something like “<!– ddfm” into the search box. WordPress will then return a list of the posts that include that shortcode. It works with any kind of shortcode you use in your content, so you could just as easily search for “[contact-form-7” in the content.
I realize that, for a lot of people, this is kind of “duh, I can’t believe you didn’t know that before,” kind of thing; but for others it’s more of a “I can’t believe I didn’t think about that,” kind of revelation.
Leave a Reply