Skip to content

Instantly share code, notes, and snippets.

View patrickcoombe's full-sized avatar

Patrick Coombe patrickcoombe

View GitHub Profile
@patrickcoombe
patrickcoombe / bash-wp-cli-bulk-delete
Created July 8, 2025 16:36
Bash Script Bulk Delete URLs in WP Using WP CLI
#!/bin/bash
while IFS= read -r url; do
# use sed to parse the URL since it really only needs the slug I could have done this manually instead but whatever
# also note make sure you have a file called urls.txt with the right perms with the URLs you wanna delete
slug=$(echo "$url" | sed 's|.*/||; s|/$||')
# Find post ID by slug
post_id=$(wp post list --post_name="$slug" --field=ID --post_status=any)
if [ ! -z "$post_id" ]; then
wp post delete "$post_id" --force
echo "Deleted: $url (ID: $post_id)"
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "ABD STUDIO",
"description": "ABD STUDIO is an interior design studio located in the heart of San Francisco’s Russian Hill neighborhood, at 2418 Polk Street. Nestled among charming storefronts and walkable streets, our light-filled studio is just minutes from many of our project sites across San Francisco.",
"url": "https://abd-studio.com",
"address": {
"@type": "PostalAddress",
"streetAddress": "2418 Polk Street",
@patrickcoombe
patrickcoombe / multiple-types-json-ld.js
Created July 7, 2025 16:25
Multiple Types of JSON-LD in One
<script type="application/ld+json">
[
{
"@context": "https://schema.org",
"@type": "GeoCoordinates",
"name": "GeoCoordinates",
"latitude": "33.1187514",
"longitude": "-117.0859457",
"@id": "https://specialtydesignbuild.com/#GeoCoordinates"
},
@patrickcoombe
patrickcoombe / sportingEventTeamEtc
Created July 4, 2025 17:18
Advanced Sporting Event
{
"@context": "https://schema.org",
"@type": "SportsTeam",
"name": "Springfield Hawks",
"sport": "Basketball",
"logo": "https://www.springfieldhawks.com/logo.png",
"homeLocation": {
"@type": "Place",
"name": "Hawks Arena",
"address": {
@patrickcoombe
patrickcoombe / sportsTeamOrgAssociation.js
Created July 4, 2025 17:12
Sports Team Sports Organization and Sport Association Rolled into 1 JSON-LD Example
{
"@context": "https://schema.org",
"@type": "SportsTeam",
"name": "Springfield Hawks",
"sport": "Basketball",
"memberOf": [
{
"@type": "SportsOrganization",
"name": "Springfield Basketball League"
},
@patrickcoombe
patrickcoombe / sports-team.js
Created July 4, 2025 16:59
Sports Team JSON-LD
{
"@context": "https://schema.org",
"@type": "SportsTeam",
"name": "Springfield Falcons",
"sport": "Soccer",
"memberOf": {
"@type": "SportsAssociation",
"name": "Springfield Soccer League"
},
"coach": {
@patrickcoombe
patrickcoombe / certification-schema-eg.js
Created July 4, 2025 16:55
Certification Schema.org Example
<script type="application/ld+json">
{
"@context": [
"https://schema.org",
"https://www.w3.org/ns/credentials/v2"
],
"@type": "VerifiableCredential",
"validFrom": "2022-01-01T16:00:00Z",
"id": "http://certification.example/credentials/99876",
"issuer": "https://certification.example/issuers/1562",
@patrickcoombe
patrickcoombe / certification-json-ld-example
Created July 4, 2025 16:55
Certification JSON-LD Example
{
"@context": "https://schema.org",
"@type": "Certification",
"name": "USDA Organic",
"url": "https://www.usda.gov/topics/farming/organic-agriculture"
}
<script type="application/ld+json">
{ "@context": "https://schema.org",
"@type": "Organization",
"name": "Elite Strategies",
"legalName" : "Elite Strategies Llc",
"url": "http://www.elite-strategies.com",
"logo": "http://cdn.elite-strategies.com/wp-content/uploads/2013/04/elitestrategies.png",
"foundingDate": "2009",
"founders": [
{
@patrickcoombe
patrickcoombe / physician-office-json-ld.js
Created July 3, 2025 17:28
Physicians Office JSON-LD example
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "PhysiciansOffice",
"name": "Smith Medical Clinic",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Health St",
"addressLocality": "Boston",
"addressRegion": "MA",