Figured it out, I was using the wrong function.
Correct function was get_the_category_by_ID($cat);
Related Posts:
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- How to check if I’m on the last page of posts?
- Check if a post is in any child category of a parent category
- How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms
- How to display non-hierarchical taxonomy as terms with checkboxes?
- get_categories for custom post type with a specific custom taxonomy attached
- Control term order on a per-post basis
- Could not insert term into the database
- How can I add the featured image functionality to a custom taxonomy?
- Share one taxonomy across multiple blogs in 3.0 [duplicate]
- Can a Child Category Have More than One Parent?
- Combine two taxonomies in a hierarchical tree
- Weird behaviour when adding terms/term_taxonomies programmatically
- How can I select a primary category?
- wp_update_nav_menu_item() to insert categories
- Get page content by category or tag
- Admin Panel – Disable Moving Selected Terms To Top of Metabox
- How to make custom taxonomy check boxes like ‘Categories’
- Create terms when registering taxonomy?
- Category page showing posts from all categories
- How to create non-unique sub-category slugs?
- Loop with Dynamic Categories
- How to get next previous category in same taxonomy?
- Display only deepest category on a single post?
- Create a full width responsive header image per page
- Remove child products from woocommerce category page [closed]
- Using same slug name for a page and category
- Remove “Category Archives: title” at the top of a category page [duplicate]
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- How to have a static category/author page?
- Listing all posts from current category on page
- How to Override default update_count_callback for category
- Wrap a chosen category name with div
- I use same slug name for category and page
- Does WordPress Offer a Way to Find All of the Categories that Don’t Have Children?
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- Page with the same name of a category
- wp_list_categories, Add class to all list items with children
- Getting WordPress custom taxonomy/category?
- Display empty taxonomy terms with get_terms()
- Show posts of category in a page
- Return category slug / title from category ID
- Connecting WordPress gallery to custom categories (taxonomy)
- Show pages and articles in category search result
- How to create taxonomy values for pages and list them in wp-admin
- How to get the number of child categories a specific parent category has?
- Get term by slug in Gutenberg
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- What’s the difference between “parent” and “category_parent” in a WP_Term object?
- Update taxonomy value of post type in query
- How to query posts from specific authors and categories using WP_query?
- How to get the depth of a category’s subcategories
- New categories are now going to 404s
- How can I convert some categories to a custom taxonomy?
- Any way to assign Post Categories and Tags to Links?
- Duplicate Category and Page URL loads Category instead of the Page
- Add custom taxonomy under the category title
- Display name of the last child category
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- “Reversable” and “Re-useable” Subcategories (or other taxonomic structure)
- Add a specific category at a specific place to the menu that uses wp_list_pages
- Get multidimensional array that reflects category hierarchy
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- How to export/import categories and keep their IDs?
- How to use wp_category_checklist()?
- Viewing category pages without the word ‘category’ in URL
- in_category() works in single.php but not in page.php?
- List Terms in Category
- How to get category URL with the slug?
- Get all sub-categories of a parent category
- Can I use get_adjacent_post for specific categories?
- Categories vs. Page Site Organization
- How to view WordPress’ default category IDs?
- Random taxonomy category list
- How do I automatically put categories and their descriptions on a WP Page?
- Taxonomy filter all children
- editing fonts of category links from the_category() funtion
- Display Slug instead of Name
- Is it possible to restrict viewing of category PAGE to logged in users only?
- Force a user’s posts category
- Search Posts / Pages with multiple options?
- Change existing taxonomy settings when using custom taxonomy
- ACF: Display category name using taxonomy field
- Hard coded main navigation
- How to get the id from the custom category?
- Show Available Taxonomy List with Current Category
- category filter doesn’t work in WPML
- How to filter out Categories for specific post types on WordPress Admin?
- Exclude a category from the_category in the single post page
- How can i insert term in a specific language of Polylang?
- How to make 2 tag feeds show up on 1 page?
- Taxonomy name repeating when showing 2 posts from each category
- Why does the argument list_only do on Walker_Category_Checklist::start_el?
- New Categories Not Shown In the Post Edit Page
- Search in custom post type AND in pages with category
- Shortcodes not working in category or tag description
- Filtering multiple categories via the URL
- Display specific categories by ID
- posts_nav_link(); picks up index.php instead of category.php as template