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 do I query a custom post type with a custom taxonomy?
- what is the correct way to compare dates in a WP query_posts meta_query
- Change “Enter Title Here” help text on a custom post type
- How to get post content by calling ajax?
- How to show all posts of the category in wordpress?
- Get the ID of the latest post
- Using meta_query, how can i filter by a custom field and order by another one?
- Return all custom meta data for one custom post type
- Display a query with multiple post types and same relationship on a single page
- How do I get a post (page or CPT) ID from a title or slug?
- Limit the word count in the post title
- Fail to compare dates in meta_query
- How to filter custom posts by tags and custom fields?
- Order by & include array by specific post ids
- How to call a custom post with get_posts() instead of query_posts()?
- Is there a way to override the tag specified in header.php?
- Custom post type archive 404’s with paginate_links
- How to correctly get post type in a the_title filter
- How to hook into the CPT’s title placeholder?
- title_save_pre on post publish
- Set Custom Post Type title to the Post’s Date
- 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
- Display Custom Post Type Fields
- Querying custom posts and regular posts
- 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 hook get_terms() to only show count of posts that have custom meta
- Using Offset in Custom Post Type Query
- how to group custom post type posts by custom taxonomy terms
- order by meta_value serialized array
- Posts per Page on custom Taxonomy Template
- Custom Post Type with Custom Title
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- Loading post content in FancyBox
- Setting a title on a Custom Post Type that doesn’t support titles
- Query posts by custom post type and custom taxonomy
- Using a Custom Field instead of original title field but only for Custom Post Type
- Multiple templates for custom post type
- Search Post Title Only [duplicate]
- Query post types with multiple keys
- dynamically update permalink and title with the values of custom fileds
- ascending order custom post type
- posts_nav_link on single post template
- Query not returning CPT posts
- Post Rank on Single Post page based on custom field
- How to get only one category of custom post type?
- Used with meta_query in query_posts works slowly
- get_page_by_title() not returning anything [closed]
- Unable to display multiple post types in same query (WPML WP_Query)
- pre get posts changing the query
- 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?
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Custom Post Type sorted by Title
- Get all posts WHERE custom_field is LIKE value
- Quickest way to get last or oldest post date – WP Query
- How to display recent posts added in several custom post types
- ‘category__and’ for custom taxonomy?
- Posts created in a Custom Post Type are lost if published without a title
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- 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
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- 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?
- List custom post type by custom tax term as page title
- How to filter out post type meta?
- Updating post title using wp_update_post
- query_posts with a custom post type, a meta_query and sorting by post date?
- Custom query shows custom post types in trash
- Multiple post type queries (with specific arguments for each)
- Combine query_posts() and get_posts() into single query
- WP Build-In Post selector for CPT
- What’s the best way to show custom post types? With page template it’s not perfect!
- 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?
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Query custom type posts by array of IDs
- Inserting two categories
- How do I correctly query posts from a post ID?
- How to exclude certain portfolios from a loop
- Render a loop in Timber (twig for WordPress)
- show custom post’s post in two different divs [duplicate]
- How to get Custom post type by related category ID
- Trying to set up a range filter for related custom post types
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Custom post type split title, setup permalink accordingly
- Display ACF object field data using Elementor Custom Query
- Assign a tag to custom post type using a query