Category archive by default it search for posts and not your custom type, you need to tell WordPress to search for your custom type, paste this code in your theme’s functions.php file:
function cpt_Search_category_Filter($query) {
$post_type = array('post','business_sold');
if ($query->is_search || $query->is_category) {
$query->set('post_type', $post_type);
};
return $query;
};
add_filter('pre_get_posts','cpt_Search_category_Filter');
and you should be fine.
Related Posts:
- Get post with multiple meta keys and value
- Get posts for custom post type with WP_Query
- Custom Post Type Data in Sidebar widgets?
- Custom Post type in separate database table for syncing
- Why would WordPress use ‘attachment’ in a custom post type’s query string?
- Unregister post type from child theme
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- Custom Post Type With Different Views
- How to get term link that crosses different custom post types?
- Custom post type Admin Page
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- Set post title from two meta fields
- Where to put archive-{post-type}.php
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Correct way to use a form to to filter custom posts by taxonomy terms?
- Using Custom Templates for Custom Post Types for the Genesis Theme Framework?
- WordPress custom post type category pagination 404 Error
- Custom-Taxonomy as categories: Remove “most-used” tab?
- Custom Taxonomy order by Custom Field
- Custom post types – non-visible title and how it affects URL
- Limit search form to 4 custom post types only
- How can I include meta box content when searching?
- “More” span making trouble
- Get all posts WHERE custom_field is LIKE value
- Filter home_url for custom post type
- How to rename image at uploading on specific plugin or post-type in WordPress
- Loop on front-page.php
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Create custom post type on successful woocommerce order [closed]
- How to create a json API for my custom post type
- Display custom post type in hierarchical order with get_terms
- the_title filter returning wrong post type
- Am unable to reset a query properly
- Registering different Post Formats for Blog Post and CPT
- Custom post type (with parent-child relationship) singular page with pagination
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- allow BOTH post slug and meta key value in permalink for custom post type
- Filter custom posts using auto populated dropdown selectors
- A simple script to allow sorting of custom posts in admin?
- Update post meta not working in transition_post_status
- Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list
- How to change the post type a theme shows by default?
- URL rewrite add author as base
- Update database from Quick Edit according to Checkbox state of Custom Post Type
- Custom Post Type slug same as page name
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- Convert comments to Custom Post Type
- Is there any way to add a “custom field” to the CPT archive page?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- WebP Fallback for Inline Background Image in Style Attribute
- Post to Top in Array
- Detect inside a custom query the kind of post type to assign custom classes
- Checking if looped item has a parent inside a shortcode
- Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?
- Custom post type permalink returns 404 when set to private
- Assigning alternate single-{cpt} template based on blog_id in multisite
- How can i add multiple variable to a !== query
- How to Create a Separate Page for Blog Posts in WordPress
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Custom Post Type – after disable ‘Add New’, I can’t edit and delete post
- How do I display child post types in the parent post type template
- How do I show my containing my custom field ONLY if there is a set value on that custom field? [closed]
- admin_head-post.php only works after publish / update
- shopping cart plugin development
- Add Extra Category Field to CPT Categories
- Use different categories for a custom post
- Custom Post Type URL doesn’t work anymore
- using custom taxonomies with custom post types: display list of posts by ‘category’
- How do I override the default number of items to be listed on an archive.php page? [duplicate]
- How to customize `Edit-Post` Screen
- How to hide a custom post type
- Wp PageNavi only works with default permalinks on a custom post type?
- Custom category URL not displaying posts
- Setting Parent Page to Post
- Custom Post type dont use custom page template (slug is not right)
- Get the taxonomy value in the post loop inside the archive page
- Custom Post Type & Taxonomies – Rewrite
- Custom Post Type and Structure Question
- How to access repeater field of a custom field?
- Change CPT permalink to use the category
- Custom post types & Pages hierarchy – Error 404
- custom post type section selector
- Previous/Next custom post links within custom taxonomy
- wp_dropdown_pages doesn’t allow me to select more than one custom post type
- Override “Parent” input for custom taxonomy
- How to develop custom URL redirection
- disabel for custom post Auto Upload Images
- Custom post type with Filter and Page Nav
- Questions on WordPress Codex Concept
- Custom Post Type Archive Links Not Working
- Why is this custom post type defaulting to archive.php?
- Custom post types permalinks not working
- How do I ensure custom post type information is displayed in correct order?
- Tag-post relationship problem
- Rewrite rules for using the same base slug for multiple content types
- Custom Post type as Taxonomy
- How to manage wordpress knowledge base/wiki/posts collections
- Rewrite rule taxonomy url with different values in one function
- How to display posts from IMPress for IDX Broker on home page? [closed]