Add the post type parameter to your get_posts
args.
$args = array(
'numberposts' => '3',
'category' => $category,
'post_status' => array('publish', 'future' )
'post_type' => array('post','slug-for-the-event-manager-post-type')
);
$myposts = get_posts($args);
Related Posts:
- How to set a custom post type to have viewable future posts
- Loading Custom Post Type Events into jQuery-based FullCalendar?
- sort events based on event date custom field
- 1 day after custom date change post status to draft
- Custom Post Type Events Archive Grouped By Month
- Save metadata as a timestamp, display as a “pretty” date
- Display upcoming Events for next 7 Days
- CPT EVENT – listing by month and filtering by category and month – form select option
- Creating a Custom Post Type and Joining with Users
- Select event where start date is smaller than current date and end date is greater than current date
- List of all entries of custom-post-type: Add year-parameter?
- Sort custom post type by most current date picker
- Should i use a plugin for Event Manager or code my own needs? [closed]
- the ‘save_post’ event triggers when I want to start a new post
- Empty meta-box returns publishdate if no value is set?
- Event Archive by Month
- how to compare different timestamps in wp-query for events custom post types?
- Creating an Events Feed with Sub Pages/Posts for Each Event
- Yelp-style geographic directory plugin?
- How do I list the next 7 days and any events (cpt) contained in those days
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- connect users to Custom post types
- Query events post type after current date and timezone
- Loop posts in a table ordered by a custom field value
- Custom Loop Event Page
- Add role privileges of the custom post type
- Events with multiple event dates + permalink for each date
- Query Event Posts by Date
- Unable to sort wp_query by date/time with multiple meta_key s
- Count of posts with meta_key filled in?
- How to print different informations for different post types inside The Loop?
- What would be the optimal CPT / Taxonomy design for the following entities structure
- Remove slug from custom post type post URLs
- How to rename default posts-type Posts
- How to create a custom post type without letting WordPress assign a URL
- Custom Post Types, or completely custom?
- has_term or in_category for Custom Post Types
- Posts to expire (deleted) after a date
- Removing Edit Permalink/View “Custom Post Type” areas
- Custom Post Type Rewrite Rule for Author & Paging?
- How to display category information from a custom post
- Rename the insert button in media upload window
- custom sortable column
- Custom Post Types Not acknowledged for date.php template
- How to embed form data within the ‘Add new post’
- Using shortcodes to parse POST request (containing the data from a front-end form)
- Getting a custom post type image using ‘get_post_custom’
- What is the impact if i ignore title and content in my custom post types CPT?
- Get the ID after WP_Query
- how to interconnect custom post types?
- Custom Post Type / Tab Limit
- Shortcode doesn’t display in custom post type
- How to add custom post types to normal category pages
- How to create custom boxes with text inside?
- Linking to the most recent post in a Custom Post Type
- Custom Post Type permalink shows wrong page: homepage/index.php
- using $wpdb to get custom post type with term
- Changing custom type name hides the posts
- I want to create custom post in which user can share files like PDF & DOCx
- No Permission to add new Page, Post or CPT with Admin role
- Pagination broken by naming conflict between CPT and Page
- WordPress custom post type capabilities issue
- i cant see the max_num_pages of a custom wp query
- How to get all post of custom post type by rest api?
- Rename a slug label
- Pagination Error : Duplicate argument being outputted
- Why isn’t a list of posts from my custom post type displaying in this widget?
- Assign category a default post type
- Specify a particular page to list all custom types
- WP_Query with custom post type ID
- How to access the thank you page from the single post?
- Add search to ‘Parent’ dropdown
- Timber plugin (Twig) does not show custom type posts in index page [closed]
- WordPress Custom URLs
- Custom Post Types – Taxonomy and Customization
- Display featured posts for a custom post type by taxonomy
- Creating an option for writing a post without an author attribution for a group blog on WordPress
- WordPress REST API V2: “{CUSTOM_POST_TYPE} matches Term ID List and Term ID Taxonomy Query, but should match only one.”
- Duplicate slug/permalink issue while adding same post name
- How to set a ‘page’ as parent of a custom post type?
- How to change Elementor Template for Single Page Post on Load
- Create WordPress User in backend, and automatically create a new post in Custom Post Type with user uame as the Title in the post
- Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
- Query when is one or several values
- Bulk delete (custom type) posts that are not visible on website
- Show custom post status when logged out
- Permalink URL connection between two custom types
- Why is wp_list_authors not picking up Authors from CPT’s?
- How to redirect custom post type posts to one url with htaccess?
- Search custom post type result in same template page
- How to have permalink structure based on taxonomy terms
- Pre_get_posts comparison with custom field doesn’t work
- Orderby modified only for specific post types
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- How to switch from custom post type URL to category URL?
- Unable to get the upcoming events for custom post
- Multiple Block Quotes without using HTML
- Get posts that have custom post type value
- Getting ACF relationship field information
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)