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
- Displaying the category name of a custom post type
- Clear cache when a post is submitted [closed]
- Elegant way to include only published posts with get_objects_in_term()?
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- 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?
- Convert IPTC keywords to blog post tags
- widget should display post archive by year and on click also by month
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- 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
- deleting terms programmatically
- Adding Multiple Values to a Post Meta Key
- How do I get the slug of a custom taxonomy category of a post?
- How to get the latest posting time of archived pages in WordPress?
- Post taxonomy from exif data
- 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?
- change default post archive page link
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- disable column on post and user list
- Display all months with posts and inside each month show the 5 latest posts
- 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
- Which URL to enter into browser to show all posts in archive.php?
- Get posts by name and taxonomy term
- 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?
- Force the “Choose from the most used tags” meta box section to always be expanded
- Posts list in custom taxonomy
- List category posts alphabetically on archive.php
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Get Posts Under Custom Taxonomy
- Prepending %category% onto default posts fails
- get_adjacent_post by language
- Duplicate Custom Post Type and Taxonomy Slug
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- How can I setup a relationship using categories in WordPress?
- How to display posts via custom taxonomy terms using checkboxes?
- 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
- Increase 10 post limit per page
- Automatically create a new page daily with last three posts
- Archiving posts in wordpress
- 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
- Loop parent terms {display posts} AND loop child terms {display posts}
- relating business and products with custom taxonomy?
- Is there a query string for edit.php to show all posts that have no custom taxonomy terms?
- Custom Post Type archive
- WordPress bulk category select when publishing post
- Does WP automatically tag posts into the archive?
- singular posts using archive styling
- I want to show my post for limited time, how is it possible?
- Unable to differentiate between two categories under custom post type on single.php
- Exclude a category of posts in author template
- How to edit the ‘
- Post-Archive like a page in a specific subdirectory
- 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?
- Highlighting Current Category in the Archive and Feeds page
- Geting error in post and category [closed]
- Custom post type and taxonomy page templates
- How to associate a custom taxonomy to a post multiple times
- How to display the post categories for each post inside the loop with custom format?
- WP query taxonomy optimization