If you look at the source code of get_the_category()
you see that this is not much more than a call to get_the_terms ( $id, 'category' )
, where $id
is the current post id.
So, what you need is get_the_terms ( get_the_ID(), 'game' )
. You need get_the_ID
, because the ID
is not passed to the shortcode as it is to get_the_category
.
Related Posts:
- How to get shortcode working from custom meta field
- Customizing gallery shortcode in 3.5
- Custom taxonomy: same terms, but for different years
- Multiple content areas per page
- 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()
- Print shortcode in custom action hook not where the shortcode is entered
- 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
- shortcodes – style them or change/remove the square brackets?
- Gallery IDS and Captions: hide/show on a per ID basis
- 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 do I apply style to each category of a list?
- Redirect to another page using contact form 7? [closed]
- 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
- Creating a shortcode by pulling in a custom field from a plugin
- How do I list custom taxonomy terms with the links?
- Duplicated content with custom shortcode
- wordpress shortcode not working
- Problems making shortcode with custom post types and taxonomy
- Echo the Last Child Taxonomy only (not parents)?
- How to query term_id of a Custom Taxonomy by name
- Where to upload my new custom ShortCode in Separate .php file?
- 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
- Taxonomy template is not reading
- wp.blocks.registerBlockType not showing what I want on the frontend
- 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
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Post filter with multiple checkbox taxonomy terms
- Combine Categories & Custom Taxonomy
- Local Shortcode Using WordPress Custom Fields
- Custom dropdown search form that allows users to select option B based from Option 1
- issue with saving custom metaboxes fields
- Changing ‘Add to cart’ button text and relink for some specific products [closed]
- ACF Shortcode bringing in my shortcode is adding unnecessary line breaks
- Taxonomy template by post type
- How to loop through 1 CPT with 2 Taxonomies
- How to support extra color options for shortcodes?
- 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
- How to create a shortcode with HTML code in it and custom parameters/
- Custom maintenance page
- How to customize the default HTML for WordPress Attachments
- Custom protected password page with ACF
- Customize in category page
- Custom Dashboard Home Screen Options
- How to get WordPress to accept the tag in articles (or other alternatives)
- How do I change the default admin color scheme in MP6
- How can a single line in a blog post take down my server?
- Adding a Table to the wordpress database
- how can I change the background color of all posts on my server?
- Turn off redirect to canonical domain (or host website on any hostname)
- Custom title, Bones theme
- How to change the category url jusy show /category/%category_id% in wordpress?
- How can I display a PHP foreach loop’s answers by AJAX
- Child Theme with multiple css files
- Why the css in twenteenfourteen-child theme take no effect?
- add custom content to appearance/widgets screen
- css media query question [closed]
- How to create a page /1 using ?
- theme customizer – can a single option pass multiple values?
- Separate header for static home page and posts page
- Pagination with custom field
- why won’t my custom css load with the enqueue method or any other method?
- Remove Title and White Space in Twenty Twenty theme
- How to have differents sites share the same tables of DB?
- How to add particular attribute of product in shop as well as home page
- Duplicate Header and Footer
- Custom login doesn’t stay
- Smarter Document Management links between three WordPress sites sought
- data retrieval presents last set of data
- Accountless password generation
- Create a google friendly header with text and logo
- Disallow “contributors” to edit their own posts once they’ve been set to “Pending Review”
- Why do my offline development site and online live site behave differently?