Skip to content

Instantly share code, notes, and snippets.

@warnakey
warnakey / speakable-schema.php
Last active Apr 15, 2019
Speakable Schema Example for WordPress (will use the meta description of each page for the speakable schema)
View speakable-schema.php
<!-- This schema can go in the header.php file of any WordPress site -->
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "WebPage",
"name": "<?php the_title(); ?>",
"speakable":
{
"@type": "SpeakableSpecification",
"xpath": "/html/head/meta[@name='description']/@content"
@warnakey
warnakey / index.html
Created Apr 15, 2019
HTML5 Blank Template (2019)
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title Goes Here</title>
<meta name="description" content="Meta Description Goes Here">
<link rel="stylesheet" href="style.css">
</head>
<body>
@warnakey
warnakey / ProfilePage Schema Example
Last active Apr 15, 2019
ProfilePage Schema Example in JSON-LD
View ProfilePage Schema Example
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "ProfilePage",
"mainEntity" : {
"@type" : "Person",
"name" : "Jane Doe",
"givenName" : "Jane",
"familyName" : "Doe",
"email" : "jdoe@examplelaw.com",
@warnakey
warnakey / WebPage Speakable Schema Example
Last active Apr 15, 2019
WebPage Speakable Schema Example in JSON-LD
View WebPage Speakable Schema Example
<script type="application/ld+json"> {
"@context": "https://schema.org/",
"@type": "WebPage",
"name": "Article with important information a voice searcher needs to know",
"speakable": {
"@type": "SpeakableSpecification",
"xpath": "/html/head/meta[@name='description']/@content"
},
"url": "https://www.example.com/blog/example-article/"
}
@warnakey
warnakey / BlogPosting Schema Example
Last active Apr 15, 2019
BlogPosting Schema Example in JSON-LD
View BlogPosting Schema Example
<!-- The following schema is only for individual blog entries -->
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "BlogPosting",
"headline" : "Newest Attorney Joins Our Team",
"author" : "Example Law Firm",
"description": "Our newest lawyer has joined the team. Learn more about our newest attorney here.",
"url": "https://www.examplelaw.com/blog/newest-attorney/",
"mainEntityOfPage": {
@warnakey
warnakey / Blog Homepage Schema Example
Last active Apr 15, 2019
Blog Homepage Schema Example in JSON-LD
View Blog Homepage Schema Example
<!-- This schema ONLY goes on the blog homepage (not individual blogs) -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Blog",
"name": "Example Law Blog",
"url": "https://www.examplelaw.com/blog/",
"description": "Read the blog of Example Law Firm, a divorce lawyer firm, to learn about the latest valuable information in our industry.",
"sameAs": [
"https://www.facebook.com/examplelaw/",
@warnakey
warnakey / BreadcrumbList Schema Example
Last active Apr 15, 2019
BreadcrumbList Schema Example in JSON-LD
View BreadcrumbList Schema Example
<!-- This Breadcrumb schema example would be for a 2nd level page called /blog/ -->
<script type='application/ld+json'> {
"@context":"https://schema.org",
"@type":"BreadcrumbList",
"itemListElement":[ {
"@type":"ListItem",
"position":1,
"item": {
"@id": "https://www.examplelaw.com/", "name": "Home"
}
@warnakey
warnakey / Website Schema Example
Last active Apr 15, 2019
Website Schema Example with PotentialAction (SearchAction) in JSON-LD
View Website Schema Example
<script type='application/ld+json'> {
"@context":"https://schema.org",
"@type":"WebSite",
"@id":"https://www.examplelaw.com/#website",
"url":"https://www.examplelaw.com/",
"name":"Example Law Firm",
"potentialAction": {
"@type":"SearchAction",
"target":"https://www.examplelaw.com/?s={search_term_string}",
"query-input": "required name=search_term_string"
@warnakey
warnakey / ItemList SiteNavigationElement Schema Example
Last active Apr 15, 2019
ItemList & SiteNavigationElement Schema Example in JSON-LD
View ItemList SiteNavigationElement Schema Example
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ItemList",
"itemListElement": [{
"@type": "SiteNavigationElement",
"position": 1,
"name": "Example Law Firm",
"description": "Example Law Firm Homepage",
"url": "https://www.examplelaw.com/"
@warnakey
warnakey / Organization Schema Example
Last active Apr 15, 2019
Organization Schema Example in JSON-LD
View Organization Schema Example
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "Example Law Firm",
"alternateName": "Example Law",
"url": "https://www.examplelaw.com/",
"logo": "https://www.examplelaw.com/wp-content/themes/examplelaw/assets/logo.png",
"image": "https://www.examplelaw.com/wp-content/themes/examplelaw/assets/logo.png",
"description": "Example Law Firm, a divorce lawyer firm, is one of North Carolina’s most accomplished firms practicing exclusively in the area of family law and domestic relations litigation.",
You can’t perform that action at this time.