Skip to content

Instantly share code, notes, and snippets.

/**
* Add Page Terms (Taxonomy) to Body Tag
*/
function pro_page_taxonomy_class_to_body( $classes ){
if ( $pageTaxonomy = get_the_terms( get_the_ID(), 'my_taxonomy_slug' ) ) {
foreach( $taxonomyTerm as $term ){
if(is_array($term)){
if(!empty($term['slug'])){
$termClass = 'mytaxonomy-' . $term['slug'];
array_push( $classes, $termClass );
@PropelDMS
PropelDMS / horseman-get-internal-links.js
Created September 14, 2023 19:01
Hoseman Snippet - Get Internal Links During Crawl