Clearly this is because the ID you are passing to get_category is wrong (false or 0).
i don’t know how you configured the taxonomy add on but do a vaR_dump and double check what data the get_field function is returning, maybe it’s an array with a single value in it :
get_category(array_pop(get_field('category_test')));
Related Posts:
- Put a link to a category round a hard coded A HREF
- Get posts with at least one category in common with current post?
- What is an equivalent of single_cat_title for getting the slug of the category?
- Redirect to another page using contact form 7? [closed]
- Allow two posts (from different categories) to have the same slug
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Get nice name of category from slug (remove dashes of category)
- Hide a specific category title from displaying on site
- Exclude a category slug on pagination
- WordPress using get_term to retreive slug not working as expected
- Top menu disapears in Category Pages when filtering using ACF
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- Getting key value of WP_Term object in wordpress
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- How to Remove Parents Category Permalink from Posts
- Looking to exclude blog posts from category Previous/Next buttons
- Unique key for each row in a repeater field
- How to exclude specific category from the get_the_category(); array
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Looking for most performant way to execute several similar WP queries within shortcodes
- Rename “Portfolio” slug?
- Where do posts get the sidebar from?
- Trouble With Conditional Logic in PHP
- How to query for pages/post depending on slug?
- combine Code 1 with Code 2
- WordPress custom slug (endpoint) and compare all links
- get post based on category chosen in drop down – The ajax method
- Global variable $post returning incorrect object
- Proper syntax or method for keeping url in modified isotope / category links
- What query string parameter is available for index.php, that works for both pages and blog articles?
- Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
- Get page that displays all children of taxonomy parent
- selected option if current category is the value
- How to use thumbnail size of image if I’m only using src to get image
- get_template_part based upon post’s category
- Alert Bar section within WP loop is displaying even though there are no posts
- Different post styles depending on category
- Advanced Custom Fields – display label and value only if value entered
- Define specific category name in PHP
- Category title output before opening title tag
- Include Parent Term in wp_list_categories
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- page-slug.php not working but only for specific slug
- How to get category name or ID by post?
- ACF Repeater Pagination stopped working since upgrade to php7.2
- How to hide posts of a specific custom category in WordPress?
- what is the method to echo class attribute inside the i tag? [closed]
- Add new post in existing categories using wp_insert_post
- How to change logo by category
- Problem with custom loop and wp_list_pluck [closed]
- Listing titles and custom fields of entries within subcategories
- Refactoring long if/else php chains
- random display categories – change url
- Output category list inside array
- Do not duplicate posts with multiple categories in multiple loops
- Show get_sub_field value if it exists [closed]
- Update post meta – Custom field does not match meta-key
- Define category ID using get_post_meta
- Remove Post if Advanced Custom Field is checked to fix paging
- How To Pass Array To get_the_category_by_ID() and Get An Array Back?
- Adding wp_list_categories to a specific div that was appended using jQuery
- Delete images from media library when user deletes an image from ACF Gallery
- Counting number of posts in multiple (sub)categories using shortcode
- I need to display posts in subcategory beside posts in main category
- Order category posts by last word of custom field
- Display acf taxonomy attachment
- Nested Queries of decreasing specificity
- Change category thumbnail size
- ACF: Display Google Map in frontend issues
- admin panel – How to remove “delete” button from category editing page
- Get parent category name when only child category is applied to a product
- Multiple Tag Filtering
- ACF relationship on user profile page used for allowed access
- Polylang and template files
- Notice: Undefined variable
- Show subcategory name selected in specific category woocoommerce
- Javascript Tab Gallery with Advanced Custom Fields
- Custom content using in_category
- Generate a radius search of custom post type locations
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- PHP drop down menu for my get_category child of
- PHP get_category() function redeclared
- Display a single row from nested array of custom field data
- Rearrange get_categories array compared to another array
- Sort by multiple options in custom field
- If or/and statement advanced custom fields [closed]
- Query seems to be duplicated
- ACF loop and php formatting
- !in_array doesnt recognize category
- Remove the_content From Loop
- Category List in Theme Options Page
- Code that displays images – images get shown multiple times
- Display post of specific category on page
- Displaying categories
- Product Category Page in Full Width
- Display all categories (with link) of custom post type – WordPress
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- How can I get values from a custom post type depending on where I click on my SVG map?
- Creating posts with php-script + csv
- How to limit number of posts in the certain category and exclude the oldest post automatically