Try something like this:
$terms_as_text = get_the_term_list( $post->ID, 'location', '', ', ', '' ) ;
$terms_arr = explode('some-delimiter',$terms_as_text);
echo end($terms_arr);
Related Posts:
- Custom taxonomy: same terms, but for different years
- get_terms return errors
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- Reproducing hierarchical list output from wp_list_categories(), using get_categories()
- Fast way to add countries as a custom taxonomy term?
- Is there a filter hook that I can use to change how taxonomy term names are displayed?
- How to Register and Display Widget for Custom taxonomy
- Show Custom Taxonomy Slug(s)?
- Custom Taxonomy Archive not displaying entries
- Exclude custom taxonomy tag from loop
- Hide custom field if empty
- Filter posts by custom taxonomy terms
- Function to remove archive sidebar for custom taxonomy?
- Automatically check parents (in a taxonomy) when child is selected
- How to add textarea field to taxonomy (tag)?
- How can I get the custom post type assigned to a current custom taxonomy for query?
- wp_query get post custom taxonomy in search.php
- How to get every custom taxonomy names and urls?
- Get Custom Taxonomy Terms by Date
- Display specific Taxonomy Term from Custom Post Type
- Semi complicated custom taxonomy question
- Get wordpress taxonomy slug name(s) to use as div class
- How do I list custom taxonomy terms with the links?
- How to query term_id of a Custom Taxonomy by name
- How to show parent taxonomy using get_the_terms?
- wp_insert_post custom taxonomy multiple Category not added
- query variables for custom taxonomies
- If Term Name Exists, Append a Unique ID to Slug
- Display all subterms of a custom taxonomy filtered by parent terms
- My list of terms of custom taxonomy displays 7 times
- Display Custom Taxonomy Name As A Shortcode
- Taxonomy template is not reading
- URL issue after setting up Custom Structure in Settings >> Permalinks
- How to assign a default/priority taxonomy to be shown in url in case two taxonomy items are selected
- Post filter with multiple checkbox taxonomy terms
- Combine Categories & Custom Taxonomy
- Custom dropdown search form that allows users to select option B based from Option 1
- issue with saving custom metaboxes fields
- Taxonomy template by post type
- How to loop through 1 CPT with 2 Taxonomies
- Custom terms in custom category taxonomy
- How to setup a taxonomy that can have only one post assigned to it?
- Grouped custom taxonomy query
- Create advanced portal website with sections – taxonomy usage?
- Custom Query for Taxonomy
- Adding a third custom taxonomies
- Multiple Inputs in a Customizer Control
- Embedding a SOAP Client into a WordPress Plugin?
- Rearrange elements outputted by comment_form()
- How to build custom WP admin with custom URLs
- Custom editor field displaying HTML in Visual editor
- generate unique number when registering a user
- How to set default values for options page
- How do I deque the default stylesheet?
- Using Custom Posts with Metaboxes and Drop-downs
- How to import custom data via XML, CSV, etc
- Widget Javascript code (ajax)
- Removing the “Popular Terms” area from the Taxonomy Edit Screen in the Admin Area
- How to remove query string from static resource in WordPress?
- Modify a theme to insert custom widgets?
- Custom Field as Custom Taxonomy?
- How can I defer these JS files?
- Add Custom API Call to WP-Login.php
- How to structure model showcase
- Admin search post meta
- How to recover permanently deleted blog posts?
- Create “alternative/zebra” boxes in the content area?
- Add Field to WordPress Register Form
- How to do big modifications to live site?
- How to change the “All Categories” label within the panel of my custom post type?
- inserting uploads into subdomain
- Target pages using a specific page template
- Show title bar only on archives / hide it on all posts and pages
- Rename WooCommerce sorting dropdown options [closed]
- How to customize the WordPress 2014 theme, to have page using less horizontal margin?
- get_template_directory_uri() not working
- Can ‘edit_form_after_editor’ messages be varied for specific pages?
- How to customize a site hosted on wordpress.com locally [closed]
- Using static pages on WordPress site
- Adding Multiple “Parents” in get_categories
- How to remove a settings section from the Theme Customization API preview pane?
- query_posts meta_key with current date
- Get custom field value from not-current page
- RSS feed showing deleted post
- Custom page template, not acting as page
- how or where wordress collect unlogged user session
- Customizing woocommerce product page
- Customizer options limited to specific user roles?
- Woocommerce custom “My Account” Tab – Add Save button
- WordPress Using Zip code customer shop find without woocommerce plugin
- how can custom permalink structure use for specify custom post type
- Embedded Options in a Custom Metabox
- How do I display entries in the top menu based on conditions selected in the sidebar menu?
- custom loop issue
- Bulk product editing in wordpress
- Logged in only custom page
- Search results load individual post in slide out div
- Show Site Name on WP login screen
- Adding css and js to a blank page created with custom template
- Conditional tag