I am trying to display tags related to a custom post type entry on the single page.
My Custom post type is registered as 'Blog' and the here is the code for the tags in my functions.php file:
function blog_tag_init()
{
$labels = array(
'name' => 'Tags',
'singular_name' => 'Tag',
'search_items' => 'Search Tags',
'all_items' => 'All Tags',
'parent_item' => 'Parent Tag',
'parent_item_colon' => 'Parent Tag:',
'edit_item' => 'Edit Tag',
'update_item' => 'Update Tag',
'add_new_item' => 'Add Tag',
'new_item_name' => 'New Tag Name',
'menu_name' => 'Tags',
);
register_taxonomy( 'blog-tags', 'blog',
array(
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'hierarchical' => false,
'query_var' => true
)
);
}
add_action( 'init', 'blog_tag_init' );
In my single template file I use the code below to display the tags:
<p><?php the_tags(' and tagged under ', ', '); ?> </p>
However the tags do not appear on the single page and I have no idea why because it all looks set up correctly.