Skip to content

Instantly share code, notes, and snippets.

@bhubbard
Created March 25, 2015 17:59
Show Gist options
  • Save bhubbard/4cba24fb70a8e1f7199c to your computer and use it in GitHub Desktop.
Save bhubbard/4cba24fb70a8e1f7199c to your computer and use it in GitHub Desktop.
WP Lawyer Taxonomies
<?php
// Practice Areas
$terms = get_the_terms( $post->ID, 'wplawyer-practice-area' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Cities
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-city' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Cities
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-city' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Counties
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-county' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// States
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-state' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Districts
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-district' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Law Schools
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-lawschool' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Undergraduate Schools
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-undergrad' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Languages
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-languages' );
foreach($terms as $term) {
echo $term->name;
}
?>
<?php
// Languages
$terms = get_the_terms( $post->ID, 'wplawyer-attorney-associations' );
foreach($terms as $term) {
echo $term->name;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment