Thanks all for help here the link about solved it
bcworkz
(@bcworkz)
37 minutes ago
There are two issues I see. $cat_array is an array of IDs, not objects, so the ‘cat’ query arg should just be 'cat' => $cat,
The other is when you use setup_postdata( $post ),
you must explicitly declare global $post;
Related Posts:
- Append taxonomy terms as class names in markup?
- Different Category system needed for the Custom Post Type
- Foreach loop returning more than one item when querying taxonomy
- Function to erase every post from a taxonomy
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- set object terms after some some time of published post – functions.php
- update custom taxonomy custom fields
- Check that a slug is present in the get_terms request
- Assigning categories to custom post types via a front-end form; only works for native post type
- Change Search display for Custom Post Type
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Custom Loop for custom post type. Compare by meta_value?
- limit selection of custom taxonomies to one?
- Display a query with multiple post types and same relationship on a single page
- Get Custom Taxonomy ID within loop
- Custom post status not working
- clients list using wordpress
- Get custom post type by category in a page template
- Find callback function for custom taxonomy metabox
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- Categories under custom post types doesn’t show properly
- How do I add a custom post type to the Featured Content in twenty fourteen theme?
- Ajax filter with custom taxonomies
- Filter posts with ajax form and checkboxes
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Get all taxonomies for all post types
- How do you output custom code between posts in the loop?
- Show ACF field from custom taxonomy and display on the single template
- List terms from Custom Taxonomy
- WP_Query search posts by custom post type and custom taxonomy
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- Output custom post shortcode. Help spot the error.
- GravityForm: Populate Dropdown with custom post type [closed]
- How to output wordpress custom tags separated by comma?
- Loading all files within a directory
- Custom Post Types relationships
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Weird problem happening with custom taxonmy when creating/updating posts
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Filter categories of posts with checkboxes
- Insert HTML inside link in a walker
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Custom Taxonomy Permalinks Redirection
- Getting the URL of the parent page
- Remove standard meta boxes from custom taxonomy
- How to display selected taxonomies by their parent
- Custom Field Order by Last Name and First Name
- get_posts of Custom Post Type AND Custom Taxonomy
- What’s the difference between same wp functions get_posts(); functions in different form?
- Received nothing after executing AJAX post function
- How to customize a permalink (URL) structure?
- Can I list a custom post type within another custom post type in the admin area?
- Get custom post type list for every category shortcode
- Set URL link to featured image of custom post type
- AJAX load more for different custom post type loops
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- get_post_meta not working on publishing
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- ACF field key/value to show on taxonomy list
- Query taxonomy of taxonomy of custom post type
- post_content is stripping HTML when adding a new post? [closed]
- Nested Custom Taxonomies | Incorrect posts when querying
- Using Wp_Query, Json to add Highcharts series data
- Template code to split a post and print a custom field?
- Commas not displaying in implode
- add custom tags for custom post type in wordpress
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Let users upload image(s) to the post from front end
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Using page title as a link to term archive
- Post type Echo code is repeating on homepage
- Setup page template array in a custom post type
- How do I ensure that post_type and Taxonomy use the same slug?
- Custom post type page with parameter
- How to get post count of specific taxonomy that have store name & category
- Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?
- redirect after submiting post for review
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- How to divide Subcategories into pages of parent category wordpress
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Custom front-end form for adding post – Category problem
- php dynamic content inside shortcode
- Filter taxonomy by CPT
- Get all post under custom post type grouped by custom filed value in custom taxonomy
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Pagination not working in custom post type. Help
- How to add specific terms in a custom post type?
- Limit custom post type to the authors only on front-end!
- CPT tags not showing when editing post
- pagination problem listing custom post types of taxonomy in wordpress