SEO & Analytics Guide Intermediate 4 min

Add Schema to WordPress Without a Plugin: Organization, Breadcrumbs, FAQ and Open Graph

Structured data tells search engines and AI assistants who you are and what each page is about. Four snippets for Organization, breadcrumb and FAQ schema and Open Graph tags, and how to check you don't output them twice.

TutorialIntermediate15 minTested on WordPress 7.1Updated November 17, 2026

Search engines read your text, but they also look for structured data: a machine-readable summary of what’s on the page. It’s how Google knows your site’s name and logo, which page a post belongs under, and which image to show when someone shares a link. AI assistants use the same data to understand and cite pages.

Check what you already have

Slim SEO, Yoast, Rank Math and most SEO plugins output Organization, breadcrumbs and Open Graph tags. Paste one of your URLs into validator.schema.org first. If it already lists these, you’re done, or you only need the pieces it’s missing. Two copies of the same schema confuse search engines more than none.

Who runs the site: Organization and WebSite

This goes on the homepage only. It tells search engines your organisation’s name, logo and official social profiles, and which name to show for your site above search results:

functions.phpPHP
add_action( 'wp_head', function (): void {
	if ( ! is_front_page() || defined( 'WPSEO_VERSION' ) || defined( 'RANK_MATH_VERSION' ) || defined( 'SLIM_SEO_VER' ) || defined( 'SEOPRESS_VERSION' ) || defined( 'AIOSEO_VERSION' ) ) {
		return;
	}

	$name = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
	$logo = has_custom_logo() ? wp_get_attachment_image_url( (int) get_theme_mod( 'custom_logo' ), 'full' ) : get_site_icon_url( 512 );

	$organization = array_filter( [
		'@type'  => 'Organization',
		'@id'    => home_url( '/#organization' ),
		'name'   => $name,
		'url'    => home_url( '/' ),
		'logo'   => $logo ?: null,
		'sameAs' => [
			'https://www.linkedin.com/company/example',
			'https://x.com/example',
		],
	] );

	$website = [
		'@type'     => 'WebSite',
		'@id'       => home_url( '/#website' ),
		'name'      => $name,
		'url'       => home_url( '/' ),
		'publisher' => [ '@id' => home_url( '/#organization' ) ],
	];

	echo '<script type="application/ld+json">' . wp_json_encode( [ '@context' => 'https://schema.org', '@graph' => [ $organization, $website ] ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_HEX_TAG ) . "</script>\n";
} );
Tested on WordPress 7.1 · PHP 8.3Checked November 17, 2026

It uses your site title and the logo from your theme settings, so there’s little to fill in except the sameAs links to your real profiles. If an SEO plugin is active, the snippet does nothing.

Note

Google no longer shows the sitelinks search box in results, so there’s no need to add a search action to this schema.

Where the page sits: breadcrumbs

Breadcrumb schema lists the path to the current page, such as Home › Blog › Security › This post. Google can show it in place of the raw URL in search results, which is easier to read and shows the page’s context:

Snippet

Add Breadcrumb Schema Markup Without a Plugin

Output BreadcrumbList JSON-LD schema in your page head for singular posts, taxonomy archives, and custom post type archives to help Google display breadcrumbs in search results.

PHPIntermediate
View

Schema describes breadcrumbs. If you also want them visible on the page, which helps visitors as much as search engines, this prints an accessible breadcrumb trail you can add to your templates:

Snippet

Display Breadcrumbs Without a Plugin

A template function that prints accessible breadcrumbs for posts, pages, archives, search and 404 pages.

PHPIntermediate
View

Questions and answers: FAQ

FAQ schema marks up a list of questions and answers on a page. This snippet adds a box to the editor where you paste them as JSON, checks they’re valid when you save, and prints the schema:

Snippet

Add FAQ Schema From a Custom Field

Define FAQ question and answer pairs in a custom field and output FAQPage JSON-LD schema automatically, enabling Google's FAQ rich results without a plugin.

PHPIntermediate
View
Will it show in Google?

Since August 2023, Google shows FAQ rich results only for a small number of well-known government and health sites. For most sites, the expandable questions won’t appear in Google any more. The markup is still valid and other search engines and AI assistants can use it, but don’t add it expecting extra space in Google. And the questions and answers must also be visible on the page: schema for content that isn’t there goes against Google’s guidelines.

Open Graph isn’t schema.org, but it’s the same idea: tags in the page head that describe the page for other services. When someone shares your post on social media or in a chat app, these tags decide the title, description and image they see. Without them, the service guesses, often badly:

Snippet

Add Open Graph Tags Without a Plugin

Add Open Graph and Twitter card tags to posts and pages so links share with the right title, description and image, and step aside when an SEO plugin is active.

PHPIntermediate
View

It uses each post’s featured image, title and excerpt, and steps aside when an SEO plugin is active.

Test everything

You should now see
  • validator.schema.org finds one Organization and one WebSite on your homepage, a BreadcrumbList on posts, and an FAQPage only on pages where you added questions. Nothing appears twice.
  • Google’s Rich Results Test shows no errors for breadcrumbs.
  • Sharing a post in a chat app shows its featured image, title and excerpt.

Changes in search results take a few days to a few weeks, as pages are recrawled.

Summary

Check what your SEO plugin already outputs before adding anything. Add Organization and WebSite schema to the homepage and breadcrumb schema to posts, and show breadcrumbs on the page too. Add FAQ schema only where the questions are visible and useful, knowing Google won’t show them for most sites. Make sure every post has Open Graph tags, so shared links look right.

Check your understanding

1Your SEO plugin already outputs breadcrumb schema. Should you add the snippet too?
2Why might FAQ schema not show in Google?

Was this helpful?

Written by Nahnu Plugins

We build and maintain WordPress plugins. Every guide is tested on a fresh WordPress site before it goes out, and checked again when WordPress updates.

More guides

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only