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:

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:

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


All guides · Free AI visibility checker · hilyt.it