How to Add LocalBusiness Schema to a WordPress Site (and Check It Works)
If you build sites for clinics, schools or other local businesses, LocalBusiness schema is one of the quickest wins you can ship. It tells Google, in a structured format, who the business is, where it is and when it's open. It won't rank a site on its own, but it helps Google connect the website to the real business behind it.
Here's how I add it to WordPress sites, plus the checks I run before handing a site over.
1. Pick the most specific type
LocalBusiness is the parent type. Schema.org has more specific ones, such as Dentist, MedicalClinic, School or ProfessionalService. Use the most specific type that is actually true for the business.
2. Write the JSON-LD
Here's a template for a clinic. Replace every value with the real details, and make sure they match what's written on the page and on the Google Business Profile.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "MedicalClinic", "name": "Example Physio Clinic", "url": "https://example.com/", "logo": "https://example.com/logo.png", "image": "https://example.com/clinic-front.jpg", "telephone": "+91-90000-00000", "address": { "@type": "PostalAddress", "streetAddress": "12 Main Road", "addressLocality": "Hyderabad", "addressRegion": "Telangana", "postalCode": "500085", "addressCountry": "IN" }, "openingHoursSpecification": [{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "opens": "10:00", "closes": "19:00" }], "sameAs": [ "https://www.instagram.com/exampleclinic", "https://www.youtube.com/@exampleclinic" ] } </script> 3. Add it to WordPress
There are three common ways:
- SEO plugin: Rank Math and Yoast both have local business settings. If you use one, fill it in there instead of adding a second copy by hand.
- Header code plugin: paste the script into the header of the homepage or contact page only.
- Theme: print it from
functions.phpon thewp_headhook, wrapped inis_front_page()so it only appears on the homepage.
4. Test it
- Run the page through Google's Rich Results Test and fix any errors.
- Run it through the Schema Markup Validator (validator.schema.org) to catch warnings the first tool skips.
- View the page source and search for
application/ld+jsonto see how many schema blocks the page actually outputs. - A few days later, check Search Console for structured data errors.
3 mistakes I see often
- Two plugins, two graphs. The SEO plugin outputs one schema graph and a custom block outputs another, so the homepage claims to be both an
Articleand aLocalBusiness. Keep one source of truth, and don't mark the homepage as anArticle. - Details that don't match. The phone number or address in the schema differs from the footer or the Google Business Profile. Keep the name, address and phone identical everywhere.
- Marking up what isn't on the page. Don't add reviews, ratings or prices in schema that visitors can't see on the page. Google's guidelines say structured data should reflect the visible content.
Wrapping up
LocalBusiness schema takes about 20 minutes and is easy to get wrong in small ways. Test it, keep the details consistent, and keep only one copy.
I'm part of the team at Digital Masters 360, where we handle SEO and website design in Hyderabad for clinics, schools and other local businesses. If you've run into a schema issue I didn't cover, ask in the comments.