2026-08-03 · Jack Stovell
How to add Person schema to WordPress without a plugin
You don't need an SEO plugin to add Person schema to WordPress. Hook wp_head from your theme and print a script tag of type application/ld+json containing the markup — the complete snippet below does exactly that, on the front page and about page only. It adds nothing to your plugin stack and you control every field.
Where do you put the JSON-LD?
In the page head, printed by a function on the wp_head hook. There are two safe homes for that function. A child theme's functions.php is the classic one — the child theme part matters, because if you edit the parent theme directly, the next theme update deletes your change. The other is a code-snippets plugin, which runs PHP independently of the theme and so survives both theme updates and a full theme switch. "Without a plugin" in this guide means without a heavyweight SEO suite; a small snippets utility is a perfectly good vehicle for the same code, and for non-developers it is the safer of the two.
Either way, the code is the same:
add_action( 'wp_head', function () {
if ( ! is_front_page() && ! is_page( 'about' ) ) {
return;
}
$person = array(
'@context' => 'https://schema.org',
'@type' => 'Person',
'name' => 'Jane Smith',
'url' => home_url( '/' ),
'jobTitle' => 'Freelance Data Engineer',
'sameAs' => array(
'https://github.com/janesmith',
'https://www.linkedin.com/in/janesmith',
'https://i.hilyt.it/janesmith',
),
);
echo '<script type="application/ld+json">' .
wp_json_encode( $person, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG ) .
'</script>' . "\n";
} );Change the name, job title and sameAs URLs, and change about in is_page if your about page uses a different slug. The snippet emits on exactly two URLs — the front page and that about page — because identity markup belongs on the pages that are about you, not on every archive and post. Two details are doing quiet work here: wp_json_encode handles encoding safely, and the JSON_HEX_TAG flag escapes angle brackets so no value can terminate the script element early.
What should the markup contain?
Less than you might think. Four fields do the disambiguation work:
- name — the name you actually want to be known by, consistently spelled.
- url — your canonical homepage; one stable URL that means "this person".
- jobTitle — plain and current. Skip the LinkedIn poetry.
- sameAs — an array of profiles that are verifiably yours: GitHub, LinkedIn, a hilyt profile. This is how a machine confirms which same-named person you are.
Resist the urge to pad it. Every field is a claim, and you should only add fields a public page of yours can back up — awards, addresses and employer histories that appear nowhere else create contradictions, not authority. For a field-by-field walkthrough with a fuller example, see our Person schema JSON-LD example; for which properties AI systems appear to actually use, see this breakdown.
How do you check it is valid?
Three checks, in order:
- View the raw HTML. Fetch your homepage with curl, or use the browser's view-source, and confirm the script tag is present in the served HTML. This snippet prints server-side, so it will be there — but if your site sits behind an aggressive page cache, purge it first or you'll be checking yesterday's page.
- Paste your URL into validator.schema.org, the Schema Markup Validator. It should report one Person entity with your fields and no errors.
- Don't panic at Google's Rich Results Test. It only reports types eligible for Google's own rich results, so clean Person markup can come back as "no items detected". That is not a validity verdict — the Schema Markup Validator is the right tool for this job.
What this won't do: valid markup removes ambiguity about who you are; it does not compel any AI system to cite you. It is necessary groundwork, not a ranking lever. And if you would rather not maintain the markup by hand, a hilyt profile emits Person JSON-LD, sameAs links and a plain-text llm.txt card automatically — i.hilyt.it/jack is a live example, and you can preview yours in about a minute.
Create your AI-readable profile
Related guides
- Person schema markup: a copy-paste JSON-LD example
- How to add llms.txt to a WordPress site
- Person and Organization schema that AI actually uses