Skip to content

Instantly share code, notes, and snippets.

@webcraftsman
webcraftsman / yoast-seo-links
Created Jan 19, 2022
Grab social media account links from Yoast SEO in WordPress template
View yoast-seo-links
View toolkit-map-template
<!-- Define first query for states to highlight on the map -->
<?php if($query):?>
<?php $states = array(); // create an empty array to store states to highlight on the map
$region = array(); // create an empty associative array to create place states in a defined region
?>
// Look through query to create $state array
<?php while( $query->have_posts() ) : $query->the_post();?>
<?php
$title = get_the_title();
View dependent-anchor-include.js
/*! Dependent Anchor Include Pattern */
/*
* Copyright 2011, Scott Jehl (scottjehl.com), Emil Bjorklund (thatemil.com),
* and Aaron Gustafson (aaron-gustafson.com)
*
* Dual licensed under the MIT
* Idea from Scott Gonzalez
*
* to use, place attributes on an already-functional anchor pointing to content
* that should either replace, or insert before or after that anchor