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
- What’s the difference between home_url() and site_url()
- WordPress Enqueue for homepage only, functions.php, wp-framework
- Can the new 4.8v text widget visual editor be removed?
- Which WP functions do you need to use esc_html() or esc_url() on?
- Is it possible to remove the main rich Text box editor?
- Add action hook conditionally – only when home.php in use
- Shortcode producing headers already sent error
- Enqueue Script with data attributes
- Calling a function from functions.php in header [closed]
- delete uploaded file
- How to use get_media_embedded_in_content function
- Dynamically add sub-categories to any category in the menu
- Is there a way to push javascript or css ‘on-page’ in a template via functions.php
- gform_after_submission content appears immediately after , not in post body [closed]
- Adding Google Analytics to footer selectively
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- How to change a certain text or term of WordPress into a custom into the whole site?
- Unregister Nav Menu with fallback?
- I changed “Howdy” in the admin bar in the dashboard, but when I’m viewing the site it still says Howdy!
- Fatal error: Class not found in
- Template tags vs get_template_part() vs functions.php
- How to improve WordPress search
- Changes to functions.php not working
- Insert width & height attributes to all images displayed on each page
- Custom excerpt legnths for specific pages
- Custom logo sizes for multiple logos
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Remove default user registration, login and subscriber profiles
- How to load some jquery code to make validation in the theme customizer?
- How can I reuse the WordPress search form for a custom plugin / widget?
- how to change link of some wordpress pages
- Using plugin functionality in external php script not working
- Add custom image size not working
- When to use an if statement after get_posts?
- Programmatically Create Category and sub Category
- How to mass-delete inline styles in WordPress custom post type automatically?
- Override plugin with functions.php
- Missing argument 3 for wp_register_sidebar_widget()
- Include files in child themes, declare in functions.php
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Hook specific functions if on a specific admin page
- wp_get_attachment_image function size argument not working if I also add a custom class
- Shortcode button dosent work for all posts. Work for first post only
- Display first name of logged in user?
- functions.php mistakenly deleted
- Identical custom taxonomy slugs for same hierarchical children
- Shortcode inserts paragraphs before and after executing shortcode
- Get_template_part inside a folder
- Passing values from a widget to a function within a plugin
- Contact Form 7 – Delay auto responds
- add code in functions.php will slow down the Execution speed?
- Sorting table function default
- Custom Post excerpt not working correctly
- Custom Nav Walker sub-menu
- Replace a menu with widget or a custom template file programmatically
- Wait a result before enqueue
- How do I remove the date and category form my portfolio pages
- Grab WordPress Salt Data From URL
- Get list of all custom tanonomy id