Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Search CPT Title AND Meta

It seems you are only searching the meta with $search. You need to also pass $search to s.

$args['s'] = $search

Here’s a similar question. Search that will look in custom field, post title and post content

Related Posts:

  1. Advanced search form with filters for custom taxonomies and custom fields
  2. Admin Area Custom Type Search By Meta Fields Without Title & Content
  3. How do I Paginate Search Results for Custom Post Types?
  4. Search everything (posts, pages, tags, cpt, meta)
  5. Advanced search form with filters for custom taxonomies and custom fields
  6. Extending the search context in the admin list post screen
  7. what is the correct way to compare dates in a WP query_posts meta_query
  8. How can I change the admin search posts fields?
  9. Development of a WordPress Search Plugin – Best Practices
  10. Custom field values deleted when trashing custom post type
  11. How to get all custom fields of any post type
  12. Search multiple custom fields by using meta_query
  13. Search that will look in custom field, post title and post content
  14. How Can I save multiple records in same meta key?
  15. Detect meta value changes when post is updated (post_updated)
  16. Search Custom Post Type with all meta attached?
  17. WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
  18. How Do I Use WP_Query to Run This Database Query as Search Result?
  19. WordPress Admin Panel search posts with custom post meta values along with title
  20. Backend search; include CPT meta?
  21. How to get source of custom meta image?
  22. How can I include meta box content when searching?
  23. Displaying Meta Box Image
  24. ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
  25. Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
  26. Search Custom Post Type Custom Fields
  27. Custom Fields vs Separate Table
  28. Custom search for custom post meta with pre_get_posts interferes with WP search
  29. Create a random unique 6 digit number as custom field for custom post type
  30. how to interconnect custom post types?
  31. List all images from a single post meta value
  32. Including Custom Meta with posts_where query
  33. Populate Custom Fields in a Custom Post Type?
  34. Meta Key Value in current-user-only loop
  35. How to check if user meta field is empty in conditional else statement
  36. How to implement a Google map store locator
  37. search also in taxonomy, tags and custom fields
  38. How to stick custom post at the top in search results
  39. Filter custom posts using auto populated dropdown selectors
  40. Posting to a Custom Post Type from front end – user generated content
  41. Update Post Meta for a logged in user
  42. A better way to add a meta box to custom post types
  43. Two Custom Post Types Many to Many Relationship
  44. get_post_meta not working on publishing
  45. Including metaboxes from custom post types in global search — continued
  46. How do I set all of a particular post meta to a value within the custom post type I’m in?
  47. Custom fields (wp_post_meta) vs Custom Table for large amount of data
  48. Displaying and searching Custom Posts
  49. Importing Data from a Non-WordPress database, into WP
  50. Searching Custom Fields
  51. filter search custom field query
  52. How to let users choose where to search for posts?
  53. Custom fields for custom post type
  54. Check if post with same meta value exists
  55. Submitting Custom Post Types with custom fields from Front-end form
  56. create custom meta box with default value
  57. delete_post_meta() for whole CPT / multiple posts?
  58. How to get specific post meta by title or id
  59. Add custom attributes to a post
  60. Custom Taxonomy Search result page
  61. search custom post type by custom fields on front end
  62. Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
  63. copy images from custom field to another custom field
  64. How to show custom field on specific custom post type posts only when filled
  65. Cannot obtain custom meta information
  66. How can I output WPAlchemy repeating fields meta values in my page template?
  67. How to call a post’s metadata in shortcode.php?
  68. Best way to create a search for custom post type by custom field values
  69. Filtering custom posts by custom fields (ACF) [closed]
  70. delete duplicate meta_value with same post_id
  71. updating one custom meta field only
  72. Add a class to post_class if more than one post shares same meta_value_num
  73. Add a meta field to the list of results for a custom post type
  74. Empty meta-box returns publishdate if no value is set?
  75. Filter search posts by post meta?
  76. Custom fields for post or terms which don’t update on post update
  77. WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
  78. Custom Post Type meta data getting deleted on bulk editing taxonomies
  79. Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
  80. How to keep custom post type related information
  81. How can I add a meta[] to my custom post type and search by term with the Rest API?
  82. Show posts from WP Custom Post Type selected from a field in a metabox
  83. Creating an archive page or simple template to list all values of a custom field of specific post type listing
  84. Where is get_post_meta value located?
  85. Custom meta fields not showing up in WP_Response Object via custom endpoint
  86. How to Disable option of meta field if that option is selected for any other post in custom post type?
  87. Advanced search form with multiple custom fields
  88. Add more custom fields when creating a new custom post type
  89. Search facility with directories
  90. custom search results – order results differently by post type
  91. How do I extract the contents of a CPT’s custom field for all posts?
  92. Delete custom post type metadata without deleting the post in admin area
  93. How can I get the $key / $value pairs of custom fields that were added via 3rd party plugins or themes?
  94. How to add post reference field to a plugin?
  95. Search form to find custom meta box generated data
  96. Is it good practice to search for custom posts based on custom field values?
  97. Querying meta values within an array
  98. Display a list of posts whose meta field values are equal to the ID of the post being viewed?
  99. Check for custom field value in different post type than current one and do something
  100. Filter custom post type admin list by custom meta column, where the column is another custom posts meta value
Categories custom-post-types Tags custom-field, custom-post-types, post-meta, search
wp-link-pages in header and footer of the post
Wrap php in shortcode

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress