How to Edit Json-Ld Yoast SEO
Yoast SEO does something clever that many site owners never notice: instead of dropping several disconnected schema blocks into your page, it outputs one unified JSON-LD graph where every entity, your organisation, website, web page, author, article, breadcrumbs and images, is linked by @id references. That interconnected design is why Yoast's structured data performs so well, and also why editing it feels intimidating at first. Once you understand the graph model, though, customising it is straightforward, and the payoff in rich results and entity clarity is substantial.
Let AAMAX.CO Handle Your Structured Data
Structured data is one of the highest-leverage technical wins available to a WordPress site, and also one of the easiest to get subtly wrong. At AAMAX.CO we audit, extend and validate schema graphs for clients across e-commerce, SaaS, local service and publishing niches, adding the product, FAQ, review, event and service types that unlock rich results while keeping everything compliant with search engine guidelines. Our search engine optimization team pairs schema work with technical crawl fixes, content optimisation and authority building so the improvements actually translate into rankings. If you would rather not write PHP filters yourself, hire AAMAX.CO and we will implement it cleanly and test every change.
Start With Yoast's Own Settings
Before touching code, exhaust the built-in options, because they cover most real-world needs. Under the plugin's Site Representation settings you declare whether the site represents an organisation or a person, upload the logo used in the graph, and add social profiles that populate sameAs references. Under Content Types you set the default schema type for each post type, choosing for example whether posts are output as Article, BlogPosting or NewsArticle, and whether pages default to WebPage, FAQPage or QAPage. Every individual post and page also has a Schema tab in the Yoast sidebar where you can override those defaults for a single URL. Configuring these correctly resolves the majority of structured data problems without a single line of code.
Editing the Graph With Filters
When you need to go further, Yoast exposes filter hooks that let you modify the graph before it is printed. The broadest is wpseo_schema_graph, which receives the entire array of graph pieces and lets you add, edit or remove anything. There are also piece-specific filters such as wpseo_schema_article, wpseo_schema_webpage, wpseo_schema_organization, wpseo_schema_person and wpseo_schema_breadcrumb, each receiving just that entity's data. The pattern is always the same: hook the filter, inspect or alter the array, and return it. Place your code in a small custom plugin or a child theme's functions file, never in the parent theme, so updates cannot wipe your work.
Adding a New Piece to the Graph
To introduce an entity Yoast does not output, such as a Service, Course or SoftwareApplication node, you append a new array to the graph. Give it an @type, a unique @id built from the page URL plus a fragment, and then connect it to the existing graph using isPartOf or mainEntityOfPage pointing at the WebPage node's @id. That connection is the part people skip, and it matters: an orphaned schema block sitting beside the graph gives search engines far weaker signals than a properly referenced node inside it. Yoast also provides a formal API for registering custom graph pieces, which is the cleanest route if you are building something reusable across many pages.
Removing or Replacing Pieces You Do Not Want
Sometimes the fix is subtraction. If another plugin already outputs Product schema and Yoast is duplicating it, or if you are outputting your own hand-rolled JSON-LD, you can unset the conflicting piece inside the graph filter. Duplicate or contradictory entities are worse than none at all, because they force search engines to guess which version is canonical. You can also disable Yoast's schema output entirely, but that is almost always the wrong choice: you lose the connected graph, the automatic breadcrumb markup and the author and organisation entities that help establish who is behind the content.
Always Validate Before and After
Never ship a schema change unverified. Run the URL through the Rich Results Test to confirm which enhancements are eligible, and through the Schema Markup Validator for full vocabulary validation including types that do not produce rich results. Then watch the Enhancements reports in Search Console over the following weeks, because that is where real-world errors and warnings surface at scale. A useful habit is to test one representative URL per template, one post, one page, one archive, one product, rather than only checking the homepage, since template-level bugs hide easily.
Common Mistakes to Avoid
Three errors account for most JSON-LD failures. The first is marking up content that is not visible on the page, which violates guidelines and can trigger manual action. The second is inconsistent identity data, where the organisation name, logo or URL differs between schema, your footer and your external profiles, weakening the entity you are trying to build. The third is over-marking, stuffing every conceivable type onto a page in the hope something sticks, which dilutes clarity rather than improving it. Precision beats volume every time. If you are also thinking about how AI answer engines read your site, the same discipline applies to our GEO services, where clean entity data is the foundation of being cited accurately.
Final Thoughts
Editing Yoast's JSON-LD is a layered exercise: configure the settings first, override per-post where needed, then reach for filters only when the interface genuinely cannot do the job. Respect the graph structure, keep identity data consistent, validate every change, and monitor Search Console afterwards. Done properly, structured data makes your pages easier for search engines to understand and far more likely to earn enhanced presentation in results, and that is a durable advantage worth doing carefully.
Want to publish a guest post on aamax.co?
Place an order for a guest post or link insertion today.
Place an Order