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

Custom Search Query – include only custom fields and title

In my case I use a custom query so I can just use:

$query = new WP_Query(array('post_type' => 'akteur', 'meta_query' => array(
                                'relation' => 'OR',
                                array('key' => 'wpcf-kurzbeschreibung','compare' => 'LIKE','value' => $suchbegriff),
                                array('key' => 'wpcf-zusatzinfo','compare' => 'LIKE','value' => $suchbegriff)
                            )
                            ));

Related Posts:

  1. Extend search query to search meta keys values based on search string
  2. Can wp_query return posts meta in a single request?
  3. Getting attachments by meta value
  4. meta_query where value is equal to given value
  5. WordPress altering my custom query, How to fix it?
  6. Search Posts with Custom Fields as query
  7. Group WP_Query by meta_key date
  8. How do I use wp_query for WordPress search?
  9. exclude posts with a specific custom field and value
  10. How to make Meta Query case sensitive?
  11. Display custom field meta outside loop, site wide
  12. Fetch Record based on meta key dates
  13. Extend product search with meta in WooCommerce
  14. how to make members list directory through wordpress post custom meta key.
  15. Large AND OR query timing out
  16. Categorising search results based on Custom Fields
  17. Custom WP_Query for WordPress Search Results with meta_query
  18. Search posts missing a particular custom field
  19. Order WP_Query results by meta key value in custom query
  20. Display post meta conditionally based on it’s value
  21. How do i create a custom post query when the meta value is an array?
  22. Trouble with serialized metadata
  23. Categories In English version showing not canonical URL, instead shows query search result
  24. Query against multiple locations within single custom post type post
  25. Meta key in wp_query bug?
  26. Sorting Posts with meta value not working
  27. Custom search (wp query by custom fields)
  28. How to include custom fields in wordpress search
  29. How to compare a date in custom field with today’s date in custom WP_Query?
  30. Include post content of linked posts in search
  31. Replacing search results with custom external query
  32. Prevent author bio page from showing in search results
  33. Filter posts by comparing custom meta value against postdate
  34. WordPress query posts with multiple post_meta data
  35. How do I amend wp_query before it is run/executed?
  36. wp_query search not taking keywords with together for multiple words
  37. WP_Query – Accessing MetaValue from Query Result
  38. WP_Query Meta_key is text value and need to sort as numeric not working
  39. filter wp_query result with custom field values
  40. Order post type by sum of two custom fields
  41. Wildcard search in WP Query
  42. Get a list of posts by specific category
  43. WordPress Custom Search Form Displaying Unexpected Results
  44. How to get specific post meta by title or id
  45. Search Page Returns Nothing
  46. search serialised meta_value for date value?
  47. Conditional operator OR not working with custom fields
  48. How do I check if an article is popular this week?
  49. Redirect Search to Form When No Product Results Are Found
  50. How to properly use AND / OR in custom search
  51. WP ForLoop to compare meta information of posts to determine what post to display
  52. How to avoid bypass of search bar rules?
  53. Hide products in uncategorized category from search results
  54. WP_QUERY with group by with custom fields
  55. How to order posts on each different category?
  56. Issues with search after added meta_query
  57. Intiger meta value with ‘>=’ returns posts with lower value
  58. Display posts with specific value first in query
  59. How do you determine if a result in a search query is a post or a page?
  60. get_posts custom field
  61. Get every post with value in meta key
  62. Using get_posts to get posts based on a checkbox value with Advanced Custom Fields
  63. wp_query posts with custom fields number smaller than
  64. Slow Query On Search
  65. Sorting search results with custom dropdown
  66. Posts query according to meta box date
  67. create metabox to activate slider
  68. How To Keep Search Title the same on paged Results
  69. Query posts using less than
  70. wp_query show all values
  71. change posts_orderby of the callback wp_query?
  72. How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
  73. Retrieve select tag custom values from array and display them in current page with wp_query?
  74. How to use a dropdown to filter posts by custom field
  75. Woocommerce: order posts by meta key
  76. How can I update post meta inside a WP_Query loop or the WordPress loop?
  77. Excluding posts with certain value of meta_key keeping posts without that meta_key
  78. Query only displays one page_id
  79. Nested array issue in meta_query
  80. Order a WP_Query by meta value where the value is an array
  81. Querying a large number of posts including their custom fields data
  82. How to restrict search on a certain page to only return results against custom taxonomies?
  83. Query using string from custom field as array value
  84. Filtering by multiple conditions in the loop
  85. How to show list of posts with custom field value (a date) that are coming soon
  86. add_query_arg to compare and display events from a certain date
  87. Filter out a meta key in the Search results page with two CPT
  88. Query by key or author
  89. Sort by custom field that is an array?
  90. Comparing 2 Decimal Numbers from custom fields and displaying posts
  91. Orderby two meta fields not working
  92. Sorting posts by Multiple custom fields in defined order
  93. Display count number of posts with the same specific meta_key meta_value
  94. Ignore image urls in wp_query search
  95. Search CPT Title AND Meta
  96. Query posts by searching for a string in a meta field
  97. Search.php – return number of results but cannot loop through
  98. Can I make a search query which includes a space?
  99. WP_Query meta compare must include ALL array values
  100. How to filter a static post page with ajax and $wp_query
Categories wp-query Tags custom-field, post-meta, search, wp-query
Loading internal page
WordPress check if value equals and echo “checked”

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