The syntax in the query above is wrong, it should be:
$query = new WP_Query(array(
'post_status' => array( 'publish', 'future' ),
'post_type' => 'kalender',
'order' => 'ASC'
));
That seems to solve the problem. 🙂
Related Posts:
- Custom post type archive 404’s with paginate_links
- Display Custom Post Type Fields
- Retrieving 3 latest post from each of 5 different custom post types
- how to group custom post type posts by custom taxonomy terms
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- Query not returning CPT posts
- Unable to display multiple post types in same query (WPML WP_Query)
- Query for posts in 2 taxonomies
- Quickest way to get last or oldest post date – WP Query
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Multiple post type queries (with specific arguments for each)
- Sorting multiple custom post types without a meta key/value pair by sort order
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Get latest 3 posts from multiple CPT in one query
- Polylang non-default language ignores tags in WP_Query
- Different Ways to Query Custom Post Types?
- pagination not working for category.php (custom post types in categories)
- How to display Related Posts based on number of taxonomy terms matched
- How to make WP_Query not to show irrelevant posts?
- Loop for custom post types filtered by a taxonomy
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Pagination not working on custom query on a page
- find custom post type post by searching its custom field with my string
- FacetWP paging custom wp_query
- Can’t change posts per page in WordPress Post Type Query
- postsperpage value not being applied
- Custom Post Type Query W/Category Dropdown
- Find Posts based on Child Post value
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Sorting the Loop by Taxonomy Value
- Custom Query: Multiple CPTs and a taxonomy filter
- WP query_posts group by meta field related
- Custom wp-query display post only today
- custom post type and a “sticky” position taxonomy
- Use WP_query to match post types based on custom field values
- minimize wp_query call to database
- Query the title of the page to show posts with matching category in the loop
- Main site single-property.php design, as homepage of a multisite
- Imported Content Doesnt Show Up On Frontend
- WordPress custom post type
- display news with pictures 3 small and one large (loop)
- Custom Query With Multiple Meta Key Value
- Custom post type blog pagination conflict
- Query Posts From Multiple Post Types
- send user to first page of results when reposting to page?
- How do I correctly query posts from a post ID?
- How to exclude certain portfolios from a loop
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Display ACF object field data using Elementor Custom Query
- Assign a tag to custom post type using a query
- Custom Post Type “Event”: chronological list of recurring events
- order by meta_value serialized array
- How to query for posts (in hierarchical custom post type) that have children?
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- WP_Query pagination using only numbers instead of /page/1 on URL
- Parent / Child formatting in a list of post of a custom post type
- How do I create an archive page for standard posts?
- Is it possible to create a shortcode that will query a post based on taxonomies?
- wpdb custom post_type problem
- Pagination on category page with custom post types
- Custom query works but returns “Undefined Offset: 0”
- Query custom post type in the loop
- Filtering WP_Query
- Custom post taxonomies as tax_query terms?
- Troubles with acf/save_post and WP_Query
- Query custom post type with ACF Date
- Custom post type ‘articles’ ignores posts_per_page, reserved post_type?
- WP Query with categories only shows one post and ignores the category
- WordPress request fiter order by related post’s post_title
- query_posts adding extra code to homepage
- WordPress wp_query() basic question about args
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- How to get the post terms from a child taxonomy
- WP_Query get post from a category and from another post type
- foreach loop inside the loop creating duplicates in output
- Sorting by meta_key different to search criteria?
- All blog posts are not showing up
- How to fetch posts that are stored in the different table than (default) wp_posts?
- Custom Post Types Not Showing Up In query_posts Result
- WP Query: If field X is empty, show posts based on field Y
- meta query condition don’t work
- Filter posts by their related field’s custom field
- Custom post type category returns null
- Tell wordpress to show a single page instead of an archive page
- How to get post by meta value
- How do I get all authors posts of a custom post type outside loop
- sorting in wp query based on custom field value
- WordPress loop add heading before first of type
- Only show current category post
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Storing/querying custom date data
- WP Build-In Post selector for CPT
- How do I hide single category post on my post page
- show custom post’s post in two different divs [duplicate]
- querying to custom field over ACF REST API
- WP Query – Can’t get posts with specific taxonomy