Community Forums › Forums › Archived Forums › General Discussion › Displaying custom taxonomies in Genesis News Theme
- This topic has 1 reply, 2 voices, and was last updated 10 years, 4 months ago by Brad Dalton.
-
AuthorPosts
-
April 14, 2014 at 11:30 am #100245charriott4Member
So I have registered a custom taxonomy is my functions.php file as such:
//* States Custom Taxonomy add_action( 'init', 'register_taxonomy_regions' ); function register_taxonomy_regions() { $labels = array( 'name' => _x( 'Regions', 'regions' ), 'singular_name' => _x( 'Region', 'regions' ), 'search_items' => _x( 'Search Regions', 'regions' ), 'popular_items' => _x( 'Popular Regions', 'regions' ), 'all_items' => _x( 'All Regions', 'regions' ), 'parent_item' => _x( 'Parent Region', 'regions' ), 'parent_item_colon' => _x( 'Parent Region:', 'regions' ), 'edit_item' => _x( 'Edit Region', 'regions' ), 'update_item' => _x( 'Update Region', 'regions' ), 'add_new_item' => _x( 'Add New Region', 'regions' ), 'new_item_name' => _x( 'New Region', 'regions' ), 'separate_items_with_commas' => _x( 'Separate regions with commas', 'regions' ), 'add_or_remove_items' => _x( 'Add or remove regions', 'regions' ), 'choose_from_most_used' => _x( 'Choose from the most used regions', 'regions' ), 'menu_name' => _x( 'Regions', 'regions' ), ); $args = array( 'labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_tagcloud' => true, 'show_admin_column' => false, 'hierarchical' => true, 'rewrite' => true, 'query_var' => true ); register_taxonomy( 'regions', array('post'), $args ); }
Which works just great, however when I try to display it, nothing shows:
/* Display custom tax in the entry footer (Genesis Framework - HTML5) add_filter( 'genesis_post_meta', 'wdbc_display_custom_tax' ); function wdbc_display_custom_tax($post_meta) { $post_meta = '[post_terms taxonomy="regions" before="Region: "]'; return $post_meta; }
I do have genesis simple edits installed and currently active, however I have tried several times with the plugin deactivated and still doesnt work.
I am able to output the shortcodes [post terms] , and '[post_terms before="Region: "] just fine, however when adding the taxonomy attribute, nothing shows at all.
Does anyone have any ideas?
PS - this is the only post that currently has a custom taxonomy
http://mjnewsnetwork.com/business/colorado-pot-taxes-wont-be-as-high-as-hoped/
Web Designs By Chrissy | Twitter @designbychrissy
April 15, 2014 at 10:35 am #100501Brad DaltonParticipant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.