I think all you’d need to do is change the WP_Query from
$catquery = new WP_Query( 'cat=" .$category_id. "&posts_per_page=100' );
to
$catquery = new WP_Query( 'post_type=property&posts_per_page=100' );
This assumes your new custom post type is registered as “property” (lowercase) – if you registered the new post type using ‘Property’ or ‘properties’ use that instead.
UPDATE – trying to debug why the above isn’t working.
Try running this code to see if the query is returning the correct results. Run just this code, none of the rest of what you originally posted. This should display an array of all the results (properties) that are returned by that query, so we can make sure that part’s working correctly.
$catquery = new WP_Query( 'post_type=property&posts_per_page=100' );
var_dump($catquery);
Related Posts:
- Adding categories to custom post type in permalink
- How to change permalink structure for custom post type and it’s taxonomies?
- Filtering a custom post type by custom taxonomy in archive template
- How to build a complex page structure
- Add category to custom post URL
- Load custom posts with same tag as page
- Hide/Show only specific categories in wp-admin new-post.php
- Get categories for a specific post – Custom post type
- Include custom post types in categories widget
- How to get dynamically custom post type that are under a certain category
- Template tags to display custom post type posts in category template?
- Listing and accessing categories for a custom post type
- How to show related posts by category or custom post type?
- Custom Post Type, Two categories, Two columns with Pagination
- New WP_query in template not working with CPT+category on some pages
- WP Query group/order by category name
- Taxonomy list. Order by a specific custom post type count
- How to show custom taxonomy in the permalink?
- Custom/separate categories for custom post type
- Loop through categories and create tab for each
- Categories not working as expected with custom post type
- Query custom post types
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Custom Post Types and Categories?
- Get categories and descriptions from custom post type
- How to create new category for custom post type?
- Custom Post Types and independent Categories – complex Taxonomy
- Should I use custom taxonomy or custom post type
- How to show CPTs in term archive
- Group posts by custom post type
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Get parent categories of custom post type
- How to query_post custom posts within default taxonomy?
- Custom Post Type With Categories
- Showing posts from different categories and from custom post type
- Categories of custom taxonomy don’t show any posts
- Can’t remove front from permalinks for custom taxonomy category page
- Adding custom post type to count in category
- Category with post type pagination returns 404
- Custom Post Slug same as Parents Category Slug
- Pre-selecting the category for a custom post type
- browse by category and tags?
- List of Posts and Categories
- Create new custom post and post category of same name
- category page for custom post type
- Getting used tags per post type
- multiple custom post type on category page
- Why does accessing url by category cause issues with post types?
- Navigate posts with different post type that are in the same categories
- Why does my taxonomy have a category style div id?
- Unable to edit categories in custom post type
- Custom Post Type Category URL
- Custom Post Type Categories URL not displaying posts
- WP Query results showing posts outside of category ID
- Restrict category access to specific users/groups. Author always has access
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- Better approach for a WordPress Inventory
- Showing all posts and custom post types by using one category
- get_terms() parent, child and grandchild
- Custom Post Type Custom Archive Page Not Working
- How to properly use Categories with Custom Post Types
- 4 posts per page from single category
- Menu’s breaking, now showing all page links on site
- Retrieve Custom Taxonomies with Description and Slug
- Custom post type category permalinks and archive pages
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Display custom post types by category
- Searching in multiple category + URL hierarchy in real estate WordPress site
- Category permalinks don’t work even after flushing
- How to set “section categories”?
- Cannot use object of type WP_Error as array display category
- How to sort post category using its Description
- Custom WordPress theme not displaying posts from category
- Wanting to list all Post types under a common category
- How to show posts of the same category on a page?
- Cannot get to work tax_query array for terms
- Get posts in custom post type categories
- Do not load the categories in Category.php
- Modify the category post counting function
- Reuse the “category” slug for a custom post type
- How to sort custom post’s category by id from the theme’s function.php?
- Custom post types not displaying per category
- How To Display Category list from Portfolio post type plugin?
- Dropdown switching subcategories portfolio
- Filter wp_dropdown_categories Per Post Type
- Display custom Taxonomies same as listing Categories
- Custom Post type archives / categories give 404
- Custom Post Type – Admin Columns
- Problem to show custom post type in archive page category wise
- Need to build custom metabox select prev posts by category
- Category / Custom Post Type permalink issue
- Categories in custom post types
- Limit to add one post per category only
- Sorting custom post types by category?
- categories of custom post type shows in CMS but not in the frontend webpage
- Categories and page filtering with pre_get_posts
- How can I sort posts ascending by post title for a specific post type, but on a category archive template?
- Get all custom_post_type posts + blog posts from one category in a single query
- Select Category as Page Parent
- Get all posts of any post type in a category from REST API