I think you need to change:
$case_studies->query('post_type=case_studies&p=54,49,44');
to
$case_studies->query_posts( array( 'post__in' => array( 54, 49, 44 ) ) );
I’d look at this page for LOTS more examples. http://codex.wordpress.org/Function_Reference/query_posts. when your there search for “Multiple Posts/Pages Handling”.
Hope this helps, I’m still new to wordpress.
Related Posts:
- Pagination not working with custom loop
- Get the ID of the latest post
- Sort custom post type list table by display name of a user id stored as post meta value
- get attachments for all posts of particular post type
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Search | Wrong output & question
- Get the most popular terms for a custom post type
- show posts only on homepage but using custom post type and taxonomy for query posts via url
- Query posts between two dates (custom meta keys) CMB2
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Include different loop templates in search query
- Adding posts of custom type into the main feed
- Custom Select Query with Custom Post Types
- WP_Query search posts by custom post type and custom taxonomy
- Calculating Bayesian average for custom post type
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Selecting New & Edit Page for Custom Post Types
- How to filter custom taxonomy categories on archive?
- Modifying date filter on admin page for custom post type to link to custom field
- How to debug a blank page?
- query posts and custom post type with meta key
- WordPress Orderby Numeric Value Not Working
- Query string parameters from custom fields, inconsistent results
- Add post_type to index.php
- Order By Post Type ThenBy Taxonomy
- Custom query to filter posts that have current post as a taxonomy [closed]
- Am unable to reset a query properly
- Custom post type redirected to homepage – how to debug
- How to modify archive query with pre_get_posts to append CPTs?
- convert custom query to wp_query
- Making certain categories of CPT not publicly queryable
- Get parse_query filter to return slug instead of id
- Querying both pages and posts
- Meta query for custom post type ignored in main query
- How do I move/order posts with a tag to the end?
- Specific query for custom post type
- Display post content with respect to its title?
- First custom field value (out of several) displayed twice after query
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Displaying Posts from Custom Post Types
- Different Ways to Query Custom Post Types?
- How to organise this data within WordPress
- Number of posts in the archive
- Query multiple taxonomies with pre get posts
- show all custom posts types in home page
- Query custom post type based on post id and custom field value
- Make (custom) post type accessible only by custom query
- Graphql: Unable to query (where:{author}) for custom post type
- Custom Query: If One Post Object Field Value Is The Same As Another
- Hide text if query has no posts
- How do I get the index for a custom post?
- Getting custom post types to properly display alphabetically
- Create query for both custom post type and category
- Filtering custom posts by custom fields (ACF) [closed]
- Custom taxonomy query showing more than 4 posts
- Query Custom Post by taxonomy multiple categories
- All in one calendar custom post type query doesnt work as expected
- How to divide Subcategories into pages of parent category wordpress
- Query filter by value in meta_value array
- Change search query in wordpress custom post type
- WP Query: If field X is empty, show posts based on field Y
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Does this archive template part look like its making too many calls to the db?
- Shortcode with loop stacks output
- Displaying all posts by category and showing content on click
- Meta query and compare “!=” not working as expected
- How select query is generated in a Custom Post Type?
- Custom post type order by post_title
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- Linking posts together with Advanced Custom Fields “both ways”
- Get posts of an specific term of a custom taxonomy
- Show first posts with custom field not empty and order all by title
- Conditional posts in WP_query for search
- Display year value before a set of posts
- Help ordering custom query by Title, Ascending
- How to add parameters for custom post type
- Is it possible to add query parameters on the archive page?
- Query Only Show Text on Posts With Certain Taxonomy Tag
- Query child posts on parents single.php?
- Query Posts From Multiple Post Types
- Pagination not working with custom loop
- how to limit query_post to first page?
- WordPress can only query up to 766
- Pagination not working with custom loop
- Post content stays the same but permalink changes ?
- Pagination not working with custom loop
- Retrieve post data via WPDB class
- Listing custom post type items from a couple of custom taxonomies
- Pagination not working with custom loop
- Show custom posts with a specific “custom TAXONOMY slug” on startpage
- Allow admin to determine the order of queries?
- Posts 2 Posts: query connected — orderby problem
- Code in custom widget queries all posts, when it should only query the current post
- How to add post type in masonry posts elementory widget
- Get Posts ordered by a date custom meta field
- Load posts via AJAX without draft status