You will need to setup a new query to get posts from another post_type.
The post_type parameter will accept an array, so you can just do:
$other_posts = new WP_Query([
'post_type' => [ 'archive', 'recent' ], // or what ever your post_types are.
]);
// Then do your loop...
Check this documentation for more information.
https://developer.wordpress.org/reference/classes/wp_query/#post-type-parameters
Related Posts:
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Allow user to Edit Posts but not Add New?
- WordPress 4.4+ : How to revision CPT + metadata
- Highlight menu item when on a custom post type?
- Querying custom posts and regular posts
- Post slug changed using code doesn’t reflect on editor when post is published
- Detect meta value changes when post is updated (post_updated)
- Remove Custom Post Type menu for non-administrator users.
- Using Query Posts With Multiple Post Types And A Taxonomy
- Display Custom Post Type in divs just thumb and title
- Custom Taxonomy List links being re-written
- wp_list_categories and custom post types
- How to show particular category all post in custom single file
- Bulk 301 redirect for custom post type
- Associate Taxonomies Across Post Types
- ‘category__and’ for custom taxonomy?
- Custom field default value with counter
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- Changing ‘view’ link for custom post type on list post screen?
- Check if a specific custom field exists?
- Fetch ID’s associated with a custom post type when translated with WPML?
- Custom post type show on both Home and Date Archive
- Create custom PAGE with register_post_type
- Custom post types archive redirect
- Update CPT post meta with update_post_meta and cron job
- Can’t query tag and post_type at the same time
- Moving ‘register_post_type’ to seperate file not working
- Get post from custom post type order by two taxonomies
- Rewrite post type slug only for child theme
- Checking if Post Title is Unique as Loop Criteria
- Custom Taxonomy Archives on Custom Post type Page [duplicate]
- Override a page template from a plugin in a child theme
- Display custom fields from custom posts in RSS feed
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Versioned Custom Post Type (Not the same as revisions)
- Is it better to use WordPress Custom Post Types or Taxonomies?
- A custom post within a custom post
- Display Woocommerce Orders for specific author [closed]
- What’s the equivalent of Hide From Menus on MODX on WordPress?
- TinyMCE style formats for different post types
- Lost of query parameter when using permalink
- How to add multiple images to a custom post type without plugin [closed]
- Add post meta programmatically to attachment
- Custom Posts values in custom post overview
- Get Specific Template Part if Custom Field is Some Value
- Page as Archive page
- 3 random images from custom post type, each in a div with a diffrent class
- Displaying multiple post types on home page
- Archive links for custom post types
- Query to get child pages of current page and display it in action hook
- Make a custom column sortable by a value from a different custom post type
- Custom post type returns bad post ID
- Custom Post Types,Permalink and Heirarchy
- Send post changes to set email addresses (not users or subscribers)
- Permalinks for single-[custom-post-types] not working
- Most viewed post of custom post type
- Preventing Truncation of First Post
- how to compare different timestamps in wp-query for events custom post types?
- custom posts permalinks url rewriting
- Can I get an auto-populated dropdown list of other custom posts in a custom post edit page?
- Custom post types
- Check that a slug is present in the get_terms request
- Custom Post Type Single Page is not working
- Replace Content of Sidebar on Custom Post Type
- open custom post type in popup window instead of page
- Custom Post Type action on post update
- Custom post type shortcode
- How to enable to change Permalinks for Individual Custom Post Type
- Show Post Types customized in Template Page
- Conditional editing CPT – using editor’s role and author’s usermeta
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- Get all of a user’s posts (custom post type) then get cumulative value of a specific meta_key value from those posts
- How to replicate data storage and querying using WordPress. Custom posts/fields or Custom db tables?
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Filter before manage_posts_custom_column
- WordPress deletes custom posts instead of trash them
- Creating custom post type relationships
- How to create groups like that in buddypress?
- Display all Custom taxonomy terms and their relevant custom posts
- wordpress query_posts with foundation 6 Accordion not working correctly
- Include template if a post is a single product
- get_post_types doesn’t work in plugin
- Allow viewing the edit screen for a post type, but not make/save/publish/update changes
- Would like to add a “leaderboard” (custom field) to a custom post type
- Render custom taxonomy query as single template
- I have a custom post type that I want to query a dynamic category name from a custom meta field
- Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?
- adding a shortcode into a custom post type
- Custom Post within a custom post
- Custom My account page and custom page for editing posts
- What’s the best way to show custom post types? With page template it’s not perfect!
- show custom post types for a month
- How to write an if statement which reads: ‘if is this custom post type or a child of it do the following’?
- Post count for particular term
- Add word limit in wordpress posts editor
- wordpress custom post type shows other cpt posts in admin menu
- Url rewrite with custom post type and taxonomy
- wordpress category form fields in popup
- How can I show posts with the same tag?