If you are trying to use all of the terms in that taxonomy for something, try this:
get_terms( "location", array( "hide_empty" => 0 ) );
You may be trying to return taxonomy terms that have no relationship to any object.
Related Posts:
- Get the the top-level parent of a custom taxonomy term
- get_terms – only top level
- Custom taxonomy terms not showing as list Gutenberg Editor
- How do I get the top-level terms in a custom taxonomy?
- Order get_terms using a Custom Field
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- get_term_by not working when in functions.php
- wp_insert_term – parent & child problem
- How to remove “Taxonomy name:” from wp_title
- Widget to display custom taxonomy tag cloud
- How much faster is a tax query than a meta query?
- Custom Taxonomy Template not respecting ‘include_children’ => ‘false’
- Custom Taxonomy Relationship (ex: plant classification)
- How to group by taxonomy on Custom Post Type archive
- Help With issue on pre_get_posts filter in taxonomy
- List Custom Taxonomy Values according to a Post Meta Value
- Custom Taxonomy Images with Advanced Custom Fields
- How to display term description in empty terms archive?
- Get custom field values of taxonomy terms
- How to List Parent Term Links for Custom Taxonomy With & Without Children?
- Correct Way To Show Custom Taxonomy for Image Attachments on Template File
- Query Posts by taxonomy/Taxonomy Child Custom order
- Single reusable value for post meta: Custom Taxonomy or Post Meta?
- 404 for a custom taxonomy?
- How to display featured images for all posts with certain taxonomy label?
- Get child product categories from parent product category in WooCommerce
- Adding Age Based WordPress Category
- Register Taxonomy earlier so it can be used in functions.php and admin-ajax.php
- echo current taxonomy id for this loop?
- Add “All Posts” button to custom post taxonomy filter with ajax in wordpress
- get_terms adds slaces to the resualt
- Meta description – template code to get category description
- Posts in loop displaying all taxonomies
- Can you filter wp_dropdown_categories with terms meta?
- Custom Taxonomy in REST API
- Page and Post return 404 with custom taxonomy
- Retrieving an intersection of two terms from two different custom taxonomies via API
- WordPress thinks my custom taxonomy pages are search pages #seo
- how to change permalinks format for pagination?
- Getting WooCommerce product related child categories
- How to dropdown custom taxonomy?
- Sorting main query by custom taxonomy slug
- Creating conditional to display taxonomy term meta
- Custom Taxonomies and parents
- List of Registered Taxonomies of Current Post
- How do I display a custom field from a custom taxonomy in single.php?
- How to get posts which must match both custom taxonomies?
- Display all taxonomy, children and grandchildren with links
- Taxonomy Parent Name
- My taxonomy won’t be registered. Can’t see it in my back-end
- Avoid taxonomy-%term%.php if more than one taxonomy
- Custom Taxonomy specific to a Custom Post type – rewrite URL
- Having Issue on Passing Variable into HTML Class Tag
- get_the_tags Conditional display of a custom taxonomy
- Proper use of wp_get_object_terms
- Permalink Problems
- Get Terms for Page
- tax_query: Don’t show posts with parent term when they have a corresponding child term applied
- How can I change the output display of my pagination?
- Hide custom Woocommerce taxonomies when empty
- Can’t get taxonomy ID for each post on archive page
- forward/redirect taxonomy archive of term to a page with same name
- How to add a date creation field when a custom taxonomy relationship is created?
- List custom taxonomies associated to an author’s posts
- Singular custom taxonomy label
- Get Posts Related to Category By category id or slug
- Display just the Post’s parent Category, not child
- How to add a dynamic dropdown derived from custom taxonomy
- Tree view wp-admin terms
- Retrieve the child terms by having the parent’s information
- Order get_terms by count using a custom taxonomy hierarchy
- How to add chained dropdown filter to a wordpress website
- How to get a taxonomy by a term slug?
- Get taxonomy link with post type slug prefix
- custom taxonomy not showing up after adding capabilities upon updating to WP 5.1.1
- Change the Page Title of the Archive Page for Portfolio Tags
- Is it possible to sort the post based on a custom field?
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- qtranslate-x problem with custom term description
- Custom Tax Archive of Parents Only?
- WordPress shortcode Issue!
- Switching from catalog to product category/subcategory
- ‘Post_tag’ taxonomy tags don’t link to existing posts in CMS
- Sorting terms individually for each post
- Looking for suggestions on creating simple database (Help!!)
- Taxonomy archive page have no post
- Display list of custom taxonomies from a custom post type ordered by their parent
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- get meta fields and taxonomy of any post type
- Custom taxonomy – query returns an error
- Change taxonomy of posts
- Getting grandchildren of a post with a specified custom taxonomy?
- Taxonomy Parameters in WP Query to get posts from two different taxonomies
- Update fields with post object and custom tax with wp_insert_post
- Can you orderby slug in a taxonomy archive page using WP_Query?
- Any way to make custom taxonomy field searchable?
- Select Custom Taxonomy from Theme Options
- Getting taxonomies specific to categories
- Two taxonomies with the same slug
- Hook function when taxonomy terms change