Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Honing my JSON+LD Structured Data Skills

Denver Prophit Jr. inetbiz

💭
Honing my JSON+LD Structured Data Skills
View GitHub Profile
@inetbiz
inetbiz / rv-camphost.json
Last active Sep 19, 2020
RV / Caravan Park Lodging Business JSON+LD
View rv-camphost.json
{
"@context": "https://schema.org/",
"@type": [
"LodgingBusiness",
"CampGround"
],
"@id": "#brand",
"sameAs": [
"http://www.facebook.com/your-profile",
"http://www.twitter.com/yourProfile",
@inetbiz
inetbiz / functions.php
Created Aug 14, 2019
WordPress Function: Number of Words in Post Content
View functions.php
function post_word_count() {
$count = 0;
$posts = get_posts( array(
'numberposts' => -1,
'post_type' => array( 'post', 'page' )
));
foreach( $posts as $post ) {
$count += str_word_count( strip_tags( get_post_field( 'post_content', $post->ID )));
}
$num = number_format_i18n( $count );
@inetbiz
inetbiz / attorney.txt
Created Aug 13, 2019
Jekyll AUthor Social Profiles via nested data yaml
View attorney.txt
attorney2:
birth_country: "United States of America"
birth_city: "Paso Robles"
birth_region: CA
birth_zip: 93446
education: "Southeastern University: B.A. History – 2008, University of Florida Levin College of Law: Juris Doctor – 2011"
first_name: attorney
last_name: One
honorary: Esq
nationality: "United States of America"
@inetbiz
inetbiz / post.html
Last active Mar 31, 2019
Jekyll Article JSON+LD
View post.html
---
layout: default
---
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"url": "{{ site.url }}{{ page.url }}",
"name": "{{ page.title | jsonify }}",
"headline": "{{ page.title | jsonify }}",
View collection-page.html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "Page Title",
"url": "URL of Page",
"description": "Meta Description",
"mainEntity": {
"@type": "ItemList",
"itemListElement": [
View Endo-Stock-Report-Exporter.php
<?php
/**
* Plugin Name: Endo Stock Report Exporter
* Plugin URI: http://www.endocreative.com
* Description: A custom stock report exporter plugin for WooCommerce
* Version: 1.0.0
* Author: Endo Creative
* Author URI: http://www.endocreative.com
* License: GPL2
*/
@inetbiz
inetbiz / .htaccess
Last active Sep 1, 2017
WordPress XMLRPC Whitelisting
View .htaccess
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
allow from 127.0.0.1
allow from 185.64.140.0/22
allow from 216.151.209.64/26
allow from 66.135.48.128/25
allow from 69.174.248.128/25
allow from 76.74.255.0/25
allow from 216.151.210.0/25
@inetbiz
inetbiz / social-figure.html
Last active Jun 21, 2017
social schema markup on a figure
View social-figure.html
<figure itemid="https://www.pinterest.com/pin/201887995769400347/" itemscope itemtype="http://schema.org/SocialMediaPosting">
<link itemtype="headline" itemref="#headline" />
<img src="..." itemprop="image" />
<blockquote cite="https://www.pinterest.com/pin/201887995769400347/">
<h3 itemprop="headline">Leaked new BMW 2 series (m235i) ahead of oct 25 reveal</h3>
<p>Date posted: March 4, 2014 <meta itemprop="datePublished" content="2014-03-04" /></p>
<p>Author:
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">
<a itemprop="url" href="https://www.pinterest.com/ryansammy/">Ryan Sammy</a></span>
@inetbiz
inetbiz / article.json
Created Mar 7, 2017
Schema Article with Comments [ Work in Progress ]
View article.json
{
"@context": "http://schema.org",
"@type": "Article",
"author": "John Doe",
"interactionStatistic": [
{
"@type": "InteractionCounter",
"interactionService": {
"@type": "Website",
"name": "Twitter",
View offer-schema.html
<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img itemprop="image" src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="reviewCount">11</span> customer reviews
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<!--price is 1000, a number, with locale-specific thousands separator