Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Display your menu item's selected locations to shortcode output
* Display your selected location(s) within the WP Dispensary shortcodes
* Requires the "Dispensary Locations" add-on from WP Dispensary
* @link
add_action( 'wpd_shortcode_inside_top', 'acme_mylocation' );
function acme_mylocation() {
global $post;
echo '<span class="mylocation">' . get_the_term_list( $post->ID, 'dispensary_locations', '', ', ' ) . '</span>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.