Session Overview
Sam reported that Semrush flagged over 6,000 structured data errors on aguiarinjurylawyers.com. Two issues:
- LocalBusiness in Organization @type: The Organization entity's
@type array included LocalBusiness alongside Organization, which requires an address field. Since the Organization entity didn't have an address (the separate LocalBusiness entities do), Semrush flagged every page.
- feesAndCommissionsSpecification on Service entity: This property is not recognized by schema.org vocabulary. Multiple pages flagged.
Both issues originate from WPCode Pro snippet ID 43605 ("Sitewide Custom SEO Schema"), which is the single source of truth for all structured data on the site.
The session evolved from a simple two-line fix into a multi-hour battle with WPCode's internal caching and content encoding, ultimately breaking the homepage before stabilizing.
What Was Accomplished
Diagnosis
- Confirmed the schema source is WPCode Pro snippet 43605 (custom post type
wpcode, location taxonomy was site_wide_header, meta was everywhere)
- Identified the two Semrush errors and their exact locations in the PHP code
- Discovered the site runs TWO separate snippet plugins: Code Snippets (v3.9.5) and WPCode Pro (v2.3.5), which has been causing confusion across coding sessions
Schema Fixes Applied and Verified Live
LocalBusiness removed from the Organization entity's @type array (line 76 of snippet)
feesAndCommissionsSpecification property removed from the Service entity (line 656 of snippet)
- Script tags restored in echo statements (were already stripped from DB before session started)
- 15 English apostrophes escaped (We'll, Kentucky's, firm's, couldn't, you're, etc.)
- Sam pasted corrected code into WPCode admin editor, which handled encoding/storage correctly
- WPCode Auto Insert location set to "Everywhere" (not Site Wide Header)
Cleanup Done
- Temp Code Snippets snippet 185: deactivated