You need to pass the post types as an array, not each as its own argument.
$q->set( 'post_type', ['design', 'accessory']);
// ^ ^
Or if you’re on older PHP systems
$q->set( 'post_type', array('design', 'accessory'));
Related Posts:
- Submit post and upload image from front-end
- How to disable generation of default image sizes for some custom post types?
- How to connect different CPTs together?
- Development of a WordPress Search Plugin – Best Practices
- Mini-Site Strategy
- How To Remove These Stuffs From Custom Post Type List Screen?
- Exclude a category from WP_Query
- Using Custom Fields in Custom Post Type URL
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- Setting up custom post type archives in WP3.1? Any luck?
- Query custom post type by custom field
- show tags of custom post type ONLY
- Hierachical Custom post types permalinks not working
- WordPress custom taxonomy URL rewrite on spelling errors
- TV Show database – Best way for structuring it?
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Defining a default page for custom post type
- Using Offset in Custom Post Type Query
- Query posts by custom post type and custom taxonomy
- Get post info inside modal window?
- Custom Post Type single and archive pages are not working
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- is_singular just won’t work [closed]
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Query in a Hierarchical Custom Post Type for Children vs Siblings
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- WordPress post count not showing for custom post type author
- Can I make WordPress use a custom template for a child page
- Why is WordPress custom post type not showing in admin panel?
- Issue with pre_get_posts on custom post type archive pages
- remove permalink “front part” for custom post type
- How to show cutom post labels in options?
- Can I search only some of the fields of a custom post type?
- Save the post parent in a custom post type in Gutenberg
- Dynamic template for single custom post
- Cron job for creating posts not excecuting properly
- Unable to get Custom Plugin Options data
- Create another comment system for CPT
- WP-ADMIN – Listing all CPT in “posts” listing
- Using a custom post type for an RSS feed only
- Edit Custom Post Type on Custom Admin Page instead Post Admin
- menu link to custom post_type?
- Custom permalink with child taxonomy terms
- Advice on using Custom Post Types
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Custom post type archive with page as parent url
- Adding custom field values to wp_list_pages
- Main menu not appearing in custom post type archive
- Custom columns doesn’t appear in custom post type
- Show list of custom posts with respective attachments?
- How to insert data into meta box from another plugin?
- CPT Taxonomy As Archive Page – Error 404
- Use post in multiple places on a page with multiple posts
- List all Custom Post Type posts excluding certain Taxnomy term
- Changing custom post type URL issue
- unapprove comments on custom post type
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Conditional Statements
- I need help in designing a custom post type
- Get newest created custom category (get_term_by and variables) (outside Loop)
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Custom post type pagination error
- Taxonomy terms with the same name are updated between separate custom post types
- Publish box in CPT remove ‘edit’ link
- Custom taxonomy permalink without term, redirection to CPT slug
- Menu for taxonomies and posts belongs to taxonomy
- Display post count for a specific month
- How do I troubleshoot pre_get_posts with Debug Bar?
- WP_query has incorrect wp_posts.post_name = ‘asc’ when I have custom post type called ‘order’
- when looping through custom post data not appearing
- How to only get the content of post page while looping?
- How to add badge “new” to the post title which are showed in recent post widgets in wordpress
- edit.php all post not working
- Delete Custom Posts & Attachments
- Parent child relation between Post and Page
- How to save post title before publish?
- WooThemes – Vendors / Bookings – Allow Vendors to manage resources
- hierarchical Custom post type child permalink not found
- Add other all taxonomies as meta boxes to custom post type
- URL with Hierarchical Taxonomies and same slug for all terms and sub-terms
- order taxonomy alphabetical
- How to reset HTML filter input fields on CPT list page?
- Custom post type archive page not showing on archive-posttype.php
- Implement post status update as frontend news announcement
- WP Query with multiple post types ordered by custom meta date then published date
- Expandable WordPress content (text) inside a post
- Display Custom taxonomy, Child terms and posts in a template Under Specific Parent terms
- Custom Post Types and rewrite rules – One CPT works and a cloned one doesn’t
- Sort a custom post type loop by a custom taxomomy instead of chronologically
- how to override menu widget?
- Add custom taxonomies as class names to an archive page of custom post types
- WordPress URL Problems and Layout
- Querying meta values within an array
- Show posts of parent in edit.php
- Custom Post Type Base URL
- How to add custom column to Custom post page list?
- Rewriting hierarchical post type
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Assign a tag to custom post type using a query
- Categorizing Custom Posts in Bulk Based on Title