Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

How to Find Pages Using a Contact Form 7 Shortcode

If you’re replacing or deleting a Contact Form 7 form, first find the WordPress pages where it’s embedded. Start by copying the form’s shortcode, then look for occurrences of contact-form-7 and verify the form ID in each

How to Find Pages Using a Contact Form 7 Shortcode

If you’re replacing or deleting a Contact Form 7 form, first find the WordPress pages where it’s embedded. Start by copying the form’s shortcode, then look for occurrences of contact-form-7 and verify the form ID in each result. A shortcode match tells you where Contact Form 7 is referenced; the ID tells you whether it’s the specific form you plan to change.

1. Find the Contact Form 7 shortcode and form ID

In WordPress, go to Contact → Contact Forms and find the form you want to check. Copy the shortcode shown beside it. A shortcode looks like this:

[contact-form-7 id="abc1234" title="Request a Quote"]

This is an example; use the actual ID shown on your site. Don’t rely on the title alone: two forms can have similar names. The Contact Form 7 admin screen guide shows where to find the shortcode.

2. Search WordPress pages for the shortcode

Go to Pages → All Pages and try searching for contact-form-7 as a first pass. Open any likely matches and inspect the Shortcode block or page content. If the site uses a page builder, open the page in that builder and inspect any shortcode or form widgets. Compare the id in each embed with the one you copied.

A page search is a starting point, not a complete inventory. If a form is embedded with the Contact Form 7 block, inspect the form selected in the block rather than looking for a literal shortcode. Also check shared templates, reusable patterns, or widgets if the form appears on multiple pages. Some builders or themes keep embeds outside the main page content.

3. Use UsageRay to find candidate pages faster

  1. With UsageRay active, open Plugins → Installed Plugins.
  2. Click Find usage beside Contact Form 7.
  3. Look under Shortcodes for contact-form-7, then open the linked pages. Compare the form ID on each page if you’re looking for a specific form.

In the demo, this scan found the Contact Form 7 shortcode on Request a Quote and linked directly to the page editor. Scanning didn’t modify the page or deactivate the plugin.

UsageRay identifies one use of the Contact Form 7 shortcode and links to the Request a Quote page

For the full demo, see the UsageRay Contact Form 7 walkthrough.

Before you replace or remove the form

Write down each location you confirmed. On a staging copy, replace the form and check that it still renders and accepts a test submission using a safe test setup. If you found nothing, review Scan Coverage and check any templates or integrations you couldn’t verify. No label or search result can prove a form is safe to delete.

If this is part of a broader cleanup, use the WordPress plugin audit checklist for an inherited site to record decisions and test one change at a time.

Disclosure: This guide was drafted with AI assistance. The screenshot is a real capture from the Contact Form 7 demo site.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.