According to the function definition, wp_get_object_terms()
throws an error if it can’t find your taxonomy – and returns an empty array if there aren’t any taxonomy terms attached to that post. Have you made sure you’ve assigned a prod_cat to the custom post you’re looking at?
Related Posts:
- Add category base to url in custom post type/taxonomy
- Custom Post Type Permalink / Rewrite not working immediately
- Custom Taxonomy as Dropdown in admin
- Custom Post type in separate database table for syncing
- Creating Photo Gallery System with Custom Post Type
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- has_term or in_category for Custom Post Types
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- WordPress Custom Post Type Category Page
- post count is wrong when using same taxonomy for 2 different CPT
- Correct way to use a form to to filter custom posts by taxonomy terms?
- Custom-Taxonomy as categories: Remove “most-used” tab?
- Custom Permalinks for Custom Post Types and Taxonomies
- how to group custom post type posts by custom taxonomy terms
- Showing current taxonomy terms
- Unable to save custom taxonomy terms in a custom-built metabox
- Custom post type category, taxonomy and URL rewrite problem
- Custom Taxonomy order by Custom Field
- Archive page for taxonomy of custom post type
- Custom Post Type: How to display all of same taxonomy?
- CPT tax slug conflict with post type slug
- Exclude current post when getting related post on custom post type and taxonomy
- Show ACF field from custom taxonomy and display on the single template
- Custom post types, taxonomies, and permalinks
- How can I display my custom metaboxes on a custom post template?
- How to specify URLS for custom posts & taxonomies
- Taxonomy.php Not Showing Posts
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Display custom post type in hierarchical order with get_terms
- Am unable to reset a query properly
- Conditional Statement custom post type category
- Custom Post Type permalink shows wrong page: homepage/index.php
- using $wpdb to get custom post type with term
- Categories sorting
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Allow user to set custom order to a list of custom taxonomies?
- Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post Type Pagination Paginates Only in URL Structure
- Terms showing up in object cache on unrelated pages
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Best way to specify “article type” in URL
- Rename a slug label
- Dynamically insert an article at the top of a taxonomy archive – or?
- WordPress multisite – is it possible to have different taxonomies for each site?
- Migrating Hierarchal Taxonomy Categories Between Post Types
- How to show list of taxonomy terms associated with specific post?
- Exclude latest post from WP_Query taxonomy term loop
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Display Taxonomy Term Children in a Drop Down without Submit Button
- Use different categories for a custom post
- Filter posts by specific custom category and current tag
- Help on Custom Post Types
- Custom Post Type URL doesn’t work anymore
- using custom taxonomies with custom post types: display list of posts by ‘category’
- Custom category URL not displaying posts
- Display featured posts for a custom post type by taxonomy
- What is the most efficient way to execute recursive complex queries?
- 2 custom post type paging in 1 custom taxonomy
- WordPress REST API V2: “{CUSTOM_POST_TYPE} matches Term ID List and Term ID Taxonomy Query, but should match only one.”
- Duplicate slug/permalink issue while adding same post name
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- display post count in archive page that have relation with another taxonomy term
- Remove custom permalink base from CPT custom category and custom tags
- How to handle this wordpress custom post type rewrite problem?
- Is it possible to arrange Custom Post Types from CPTUI into a Folder?
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Change Search display for Custom Post Type
- WooCommerce – Custom related product (Spareparts)
- Automatically add CPT UI categories to the menu
- Custom category taxonomy – archive page not showing up
- tax_query not working?
- Issue with Custom Post Types and Permalinks
- Automatically Add a default category to a Custom Post Type before save_post action
- Get list of all Topics in use by a custom post type
- I want to display my custom post type arranged by taxonomy
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Display posts grouped by post type in taxonomy.php
- Advice on Categorization for a Custom Post Type
- Pods pagination erases my sub menu
- How to have permalink structure based on taxonomy terms
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- How to List CPTs Under One Tax Term
- Displaying or Hiding Metadata on Page from WP CPanel
- Get posts that have custom post type value
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Listing custom post type items from a couple of custom taxonomies
- Return Custom Post Type Categories
- Show one of the taxonomies always as default
- Custom Post type as Taxonomy
- ACF Relationship: Group posts by parent category term, then child [closed]
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
- Calling custom taxonomies
- Sort ACF by custom taxonomy
- Is it possible to use a post name in a custom post slug?
- Taxonomy Archive URL + Template