Use wp_get_object_terms function to get any taxonomy you want, category, tag, state, etc.
For example:
$terms = wp_get_object_terms(get_the_ID(), 'state');
$state = array_pop($terms);
echo $state->name;
This function is returning array of terms, so in case you only have one state, it will return array of one item in it.
Related Posts:
- How to display data in archive page?
- Filter/Sort Post Form On Taxonomy page
- Get Posts Under Custom Taxonomy
- Difference between an archive and a page listing posts
- Different post sort order within different categories
- has_archive=false on the default post type
- Clear cache when a post is submitted [closed]
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- How are terms connected with posts in database?
- Create an “All Posts” or “Archives” Page with WordPress 3.0?
- Post Format Archive template name for theme folder?
- widget should display post archive by year and on click also by month
- Must permalinks always point to single post pages?
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms
- Display most recent post in category instead of archive?
- Single.php Active Category Class
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- get_post_type_archive_link(‘post’) returns current category archive
- get_terms parent for current product only
- Adding Multiple Values to a Post Meta Key
- How to get the latest posting time of archived pages in WordPress?
- Redirection to taxonomy posts list after post submit.
- Remove custom posts that match taxonomy value
- Using Custom Posts with Metaboxes and Drop-downs
- Does an action fire when adding a tag via the “Tags” meta box?
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- Display posts from #6 to #20 on archive page
- Category List (Archive) Page Template By Category
- Getting category posts from a certain year
- Yearly archive page for future year
- Avoid duplicate post from same Taxonomy
- Automatically Updating Publish Date Bug
- Guest Author – How to display posts on /author/ archive page
- Set terms in a custom post
- Get posts of ONE taxonomy term of custom post type
- Pass data between pages
- Choose whether to automatically add a taxonomy with the same name as the post
- Display tag image in post using Taxonomy Images plugin index.php
- wp_get_object_terms returns only Uncategorized on first publish
- Setting posts_per_page for taxonomy term template
- Archiving by academic year instead of calendar year
- How to bulk-untag multiple posts?
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Get Posts Under Custom Taxonomy
- get_adjacent_post by language
- Duplicate Custom Post Type and Taxonomy Slug
- How can I setup a relationship using categories in WordPress?
- How can I hide tags on a child-category page, if that tag has not been used?
- How to display excerpt post on hamepage and archive pages?
- 404 error on default post type and default taxonomy fronted page
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- outputting posts’ taxonomies: cant get ‘get_the_taxonomies’ working
- relating business and products with custom taxonomy?
- Custom Post Type archive
- WordPress bulk category select when publishing post
- singular posts using archive styling
- Unable to differentiate between two categories under custom post type on single.php
- Exclude a category of posts in author template
- Display in category ( taxonomy) a number of post that I want
- Find out in which kind of archive am I
- adding my posts (author posts) in menu
- How to view all posts (on site, not admin) that are uncategorized?
- Archieve page, Advertisement Every 3 Posts
- How To Use Custom Tax of a Post Type
- How to output all taxonomy links from a custom post type in a menu?
- Custom post type and taxonomy page templates
- How to associate a custom taxonomy to a post multiple times
- WP query taxonomy optimization
- Permalink Short code showing unnecessary link text inside the loop
- How to hide protected posts from archive?
- blog post not accesible on click [closed]
- Redirect to custom post if custom archive page has just one result?
- Show post count in custom taxonomy page
- Taxonomy checkboxes not showing current status on edit page
- Prevent Archive URLs
- view a list of 3 future post, from the nearest to the most far
- Slug collision between page, taxonomy and custom post type
- Page 2 has no posts?
- How to get post count including nested categories
- Multiple Custom Post Type loop logic
- is_archive() not working on selected “Posts page”
- How to list all names and descriptions of a custom taxonomy
- How can add posts without category into category
- 404 for some custom taxonomy not ALL taxonomy
- My posts section for logged in user
- How to organise post by category and date
- Displaying Results From Custom Taxonomy Query
- Multiple loops on a Search result page?
- How to get all the terms of a post
- How to get alphabetic listing x other posts, based on first letter post?
- Special Query: Title, Terms, Content – %LIKE%
- How do I display the next 3 posts in the sidebar?
- retrieve post slug by post_tags taxonomy
- Display all posts from selected month
- How to get pagination working with “Pending” Posts
- Show all posts in category
- Taxonomy Category category.php not working
- how to show all post with its contents
- How to make ‘show_option_all’, that comes from wp_list_categoreis, to work with get_categories or with get_terms?