Genesis has a handy shortcode called Filed Under: Genesis, Premium Content
which displays comma separated linked terms of the specified taxonomy with category
as the default taxonomy.
Ex.: Let's say you have a portfolio
Custom Post Type with an associated taxonomy called portfolio_category
. To display all the portfolio categories (linked to their corresponding taxonomy archives) in entry meta in all views, you would add this in child theme's functions.php
:
// Show hyperlinked Portfolio Categories.
add_filter( 'genesis_post_meta', 'sk_post_meta_filter' );
function sk_post_meta_filter( $post_meta ) {
if ( 'portfolio' == get_post_type() ) {
$post_meta = '';
}
return $post_meta;
}
What if you do not want the terms to be hyperlinked?
We can register a custom [post_terms_unlinked]
shortcode that will output unlinked terms of the specified taxonomy and use it instead of Filed Under: Genesis, Premium Content
.
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.