Skip to content

Instantly share code, notes, and snippets.

@caycefischer
Created March 13, 2012 09:33
Show Gist options
  • Save caycefischer/2027830 to your computer and use it in GitHub Desktop.
Save caycefischer/2027830 to your computer and use it in GitHub Desktop.
Wordpress custom taxonomy calls and misc filter stuff
<!-- http://codex.wordpress.org/Function_Reference/single_term_title -->
<h1 class="kilo">All entries in <b><?php single_term_title(); ?></b>.</h1>
<!-- http://wp.smashingmagazine.com/2012/01/04/create-custom-taxonomies-wordpress -->
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
<!-- apply filters to hook into it later... for some reason -->
<h1><?php echo apply_filters( 'the_title', $term->name ); ?></h1>
<!-- escape_html because its an html text block -->
<p><?php echo esc_html($term->description); ?></p>
<!-- uses get_term_by slug to get the link of the current brief page -->
<p><a href="<?php get_term_link($term->slug, 'briefs')?>"> <?php echo($term->name) ?></a></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment