I've built a hierarchical taxonomy that displays a master list of available fragrances in the admin. When you create a page, you checkmark the fragrances that are available for that particular post. I used this code to functions.php and it seems to work in the admin:
add_action( 'init', 'build_taxonomies', 0 );
function build_taxonomies() {
register_taxonomy(
'scents',
'page',
array( 'hierarchical' => true,
'label' => 'Scents',
'query_var' => true,
'rewrite' => true ) );
}
Now I need to output the checkmarked items so they display on the post in the form of a drop down menu.
The problem is that it outputs ALL scents that have been check marked across ALL pages. I just need it to output the ones that have been check marked on the page you're on.
Here's the code I used:
<?php wp_dropdown_categories('taxonomy=scents'); ?>
How to edit this so that it only shows the fragrances for the page I'm on? Thanks.