Just change the $args
array to this:
//Let's say you're searching the posts with the title 'The searched post':
$pages = array();
$args1 = array(
's' => 'The searched post',
'post_type' => 'course-manager',
'posts_per_page' => -1
);
query_posts( $args1 );
Your query_posts
will return all the posts with the title alike ‘The searched post’.
Related Posts:
- How to get post content by calling ajax?
- Display a query with multiple post types and same relationship on a single page
- Fail to compare dates in meta_query
- Order by & include array by specific post ids
- How to call a custom post with get_posts() instead of query_posts()?
- Custom post type archive 404’s with paginate_links
- How to hook into the CPT’s title placeholder?
- title_save_pre on post publish
- Change title in head on Archive page
- How To Set Custom Post Type Title Without Supports
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- Loading Custom Post Type Events into jQuery-based FullCalendar?
- Set post title from two meta fields
- Limit the post for differents custom post type in the same wp_query
- Retrieving 3 latest post from each of 5 different custom post types
- How I check if the same post slug has not been used before publishing?
- how to group custom post type posts by custom taxonomy terms
- order by meta_value serialized array
- Custom Post Type with Custom Title
- Multiple templates for custom post type
- Query post types with multiple keys
- posts_nav_link on single post template
- Query for posts in 2 taxonomies
- Prevent change with new query_posts()
- How to make an archive page displaying posts in a date range
- Custom Post Types: Custom columns with Title submenu?
- Get permalink and title by post name?
- Custom Post Type sorted by Title
- Get all posts WHERE custom_field is LIKE value
- Posts created in a Custom Post Type are lost if published without a title
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- Display custom post types with custom date field value (before today) & order by custom date field
- What is the impact if i ignore title and content in my custom post types CPT?
- reference the current category being used in the category.php page
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- How to filter out post type meta?
- Updating post title using wp_update_post
- Multiple post type queries (with specific arguments for each)
- Custom query works but returns “Undefined Offset: 0”
- How to use the Display Name as the post title in a custom post type?
- What’s a better alternative to this code?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- child of post type (custom)
- How to use custom taxonomies to reference complex relationships?
- How can I run this code once so that my generated post title doesn’t keep changing on publish/update?
- Order query using custom meta data
- Get latest 3 posts from multiple CPT in one query
- Conditional Query of Custom Post Type and custom taxonomy
- will post_id ever change? Can I safely use post_id for custom queries?
- Show a Category X’s custom post type on Category X archive page?
- Custom Post Type Query for Sidebar Doesn’t Work on Front Page
- Set a maxlength for the title input in a custom post type
- How to edit this code to get the categories in achieve page?
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Query posts based on the meta key values of logged-in users?
- Different Ways to Query Custom Post Types?
- query_posts adding extra code to homepage
- How to show only the most recent post on my custom post type archive?
- Loop for custom post types filtered by a taxonomy
- Why are some of my custom posts not showing up on my page?
- post-per-page and offset not working
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- attach CPT data to a taxonomy
- postsperpage value not being applied
- Incorrect ordering of custom post type based on time
- Custom Post type showing up in loop, regular posts are not showing up
- Query Custom Post Type based on text input
- Custom Post Types Not Showing Up In query_posts Result
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Auto Generate Post Title from 2 Custom Fields
- Sticky posts limit query and pagination for a custom post type
- Custom post type archive page filters
- Trying to list years (for a filter) but not all years display
- custom post type and user post count shortcode
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Use WP_query to match post types based on custom field values
- Want to add new label in new post
- minimize wp_query call to database
- Group Custom Posts Types in a Relation field of ACF
- Can I show some specific post rather than latest post?
- update a posts of other custom post type
- How to disable Publish button on Edit post if post title exists
- How to set class to “current-page” on the currently viewed single post within a CPT
- Imported Content Doesnt Show Up On Frontend
- Optimise custom post type queries
- Display 2nd category, only once, as sub-heading, in the loop
- Filter RSS feed for custom post type to events for next 7 days only
- query_post causes the posts to be loaded twice on load more posts
- Ordering custom post type by custom field without a title
- How can I list custom post by custom category?
- Query Posts From Multiple Post Types
- Return only custom post types for the page, not all
- WP Build-In Post selector for CPT
- How to apply order on custom taxonomy and custom meta key on custom post type
- Register a title automatically with a relationship field
- send user to first page of results when reposting to page?
- Query custom type posts by array of IDs
- Render a loop in Timber (twig for WordPress)
- show custom post’s post in two different divs [duplicate]
- Display ACF object field data using Elementor Custom Query