• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
WPFeed

WPFeed

  • News
  • Tutorials
    • WordPress Multisite
    • BuddyPress
    • Design
  • Reviews
    • Plugins
  • Roundups
  • Snippets
  • Giveaways
Home » BuddyPress » How to Display Custom Taxonomy With Genesis Framework Shortcode

How to Display Custom Taxonomy With Genesis Framework Shortcode

Besides hooks, Genesis Framework has lots of shortcodes to help you customize your child theme. Before this, we’ve published a tutorial on creating your first custom post type and custom taxonomy and today, we’ll show how easy it is to display the custom taxonomy on your site.

Using Filed Under: Snippets Shortcode

If you refer to Genesis shortcode reference page, you’ll notice a less-known Filed Under: Snippetsshortcode. To display any custom taxonomy, we’ll be using this shortcode and place it on entry meta. The shortcode accepts 4 parameters:

sep – This will be the separator for the post terms list. The default is comma.

before – Text to be displayed before the post terms list. The default is “Filed Under: “, same as a category.

after – Text to be displayed after the post terms list.

taxonomy – Specify which taxonomy to be displayed. This is the most important parameter need to be specified. The default value is category.

Displaying Custom Taxonomy in Entry Meta (Footer)

To display the custom taxonomy in entry meta (footer), we’ll use genesis_post_metafilter. Here’s a working code that can be placed on your child theme functions.php file:

In this example, ‘Type’ is my custom taxonomy. Please note that the code above will overwrite the current entry meta and therefore it will remove post categories and tags.

Conditionally Display Custom Taxonomy on Custom Post Type

To conditionally display custom taxonomy anywhere on your site, we need to use conditional tags. In this example, we are using is_singularand is_post_type_archive tags. Here’s a tested and working code that can be placed on your child theme function.php file:

What the code will do is basically to only display the custom taxonomy on single page of Portfolio post type and on the archive page of Portfolio post type.

Genesis Feature Post Widget

The best thing about Genesis shortcodes is they can also be used on Genesis Featured Post widget. Therefore, if you’ve custom taxonomy and would like to display it, you may also use the Filed Under: Snippets shortcode.

Simply replace “type” and “Type: ” with the name of your custom taxonomy.

We hope this tutorial helped you to easily display the custom taxonomy on your theme. For more info about Gensis Framework shortcode, I highly suggest you check out the Shortcode Reference page on StudioPress site.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • WordPress is a brilliant platform that is loaded with tons of stuff for websites.
  • How to Sync Stock & Price for WooCommerce Products
  • How to migrate a WooCommerce Store to a new site
  • How to Import WooCommerce Products
  • How to export WooCommerce Orders

Copyright © 2023 · WPFeed.com - A Project of TechAbout LLC.

  • About us
  • Advertise
  • Write for us
  • Terms and Conditions
  • Privacy Policy
  • Contact us