It turns out the free Relevanssi plugin does this rather well. I was afraid it would only search posts and not custom post types, but it does it all… and rather well! It only requires a simple filter added to your theme’s functions.php
file to get it to omit the body content:
// search titles only (relevanssi plugin)
add_filter('relevanssi_index_content', 'contentoff');
function contentoff() {
return false;
}
alternatively you can have it omit titles (don’t use the two together or you’ll be searching nothing!
// search titles only (relevanssi plugin)
add_filter('relevanssi_index_titles', 'contentoff');
function contentoff() {
return false;
}
Related Posts:
- Adding a second email address to a completed order in WooCommerce [closed]
- How to redirect to post if search results only returns one post
- Possible to search by author name with default WordPress search function?
- paginate_links() don’t properly work in search.php?
- Filter the query ONLY for the search results page
- Extending the site search to include a single custom field
- Modify search function in WordPress (TwentyTwelve)
- How to customize search result page title?
- Display WordPress Search
- Search user metadata with checkboxes via ajax (almost working)
- Searching for content post
- Custom Taxonomy Tag Search
- Woocommerce Attributes pulling in wrong data
- WooCommerce product search titles only
- Is there a way I can find wordpress posts that don’t contain a word?
- changing behaviour of get_search_form
- woocommerce: change default setting > is_sold_individualy function
- WooCommerce – Want to show multiple currency for a single product [closed]
- Search filter by Post title OR Meta Title Value [duplicate]
- Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)
- paginate_links() don’t properly work in search.php?
- Include the post type before the title of search results
- How to rewrite wordpress search to work on specific category
- two search forms on the same page
- search form leads to 404
- Custom function for search form
- WordPress: Highlight search result exact matches
- RSS feeds for specific topics
- Search in WordPress
- Limiting WordPress Search function : Custom build
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- More than one search results page template for two searches on site
- How do i create a search option for pdf’s only
- Form output outside of container
- Limit Number of Posts on Blog Category Page Throwing 404 Error on Paginated Pages
- us states dropdown function and echo in theme template files
- Pagination in Search result
- Make WordPress search for only this tags or exclude certain tags from search [duplicate]
- child_of not working while searching
- wordpress Search function is not working
- Custom Post Type Search
- Exclude in search post and include only 3 pages
- Include bbPress topics and replies in WordPress search results?
- How to validate this deprecated function
- Using $themename Variables
- custom rss templete
- Does WordPress validate inputs to all functions? (such as get_user_meta and insert_user_meta)
- Custom random quote widget breaks when used in multiple sidebars
- Display post shortcode content in the sidebar?
- Twentyten Child Theme: header images display messed up in admin panel
- Move Post to different category if post_meta field is 0 or is 2 days old?
- Contact Form 7 – Delay auto responds
- Using a function to change favorites listing
- add code in functions.php will slow down the Execution speed?
- How to change or add user role after getting post request data about pay? [closed]
- Display alert on successful user Sign Up
- Getting different functions data while using while loop in wordpress
- How can I recompile js file in dist folder?
- How to rewrite the custom url in wordpress?
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Show Primary Category first when I display post categories
- Wp_query function to search from product_title ‘OR’ product tags name
- Sorting table function default
- How add various functions within 1 conditional?
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- Disable auto-resizing of uploaded images, but only for certain filename
- Display post lists in 2nd paragraph
- How to add seperate classes to no-search-result and found-search-result pages on wordrpess search – is_search()
- How to debug error message: Cannot modify header information
- Why is my page feed returning empty content?
- Using a post-signup hook to get user details
- How to enable specific plugin only based around shop manager role?
- How to change constants in WordPress wp-config.php programmatically?
- Function only on a specific page
- Use register_setting() in a loop
- Allow Post Author to be 0 on Update
- Load Woocommerce and WordPress Functions Outside
- Dynamic dropdown from database table
- Product object returns no sale price
- Restrict media upload size by format
- How do I hide or remove ‘Category’ from wordpress breadcrumbs
- How to use a class from another plugin
- Override Plugin Script Fucnction in WordPress
- Trouble with adding a wp_enqueue_script on wordpress
- How to make custom column Admin>Users sortable?
- How to stop twenty fifteen theme from cropping featured images?
- Display images that are not in the content
- Ordering posts by publish date not working?
- How to display custom sidebar in wordpress 5.5.2
- How do display most popular post from a year earlier to the day?
- Theme functions.php file auto delete everyday [closed]
- How can i disable auto save & revisions with `function.php` in wordpress?
- How can I get my Script to work on the Login page?
- Updating Media Published Date When Parent Post Is Modified in WordPress
- WP Ajax Function Always Returning undefined
- How to display custom option field in woocommerce orders in admin panel?
- How can I modify all existing tags while keeping the urls themselves?
- How can I grab the video id of youtube?
- How to get the index number of the posts?
- Scripts not appending to element in AJAX call – why?