This is possible by altering the search query via the posts_search
hook.
http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php#L2202
A default search query will look like this:
..AND (((wp_posts.post_title LIKE \'%search terms%\') OR (wp_posts.post_content LIKE \'%search terms%\')))
We need to remove the post content search, a regular expression should be enough.
add_filter( 'posts_search', 'wpse_45153_filter_search', null, 2 );
function wpse_45153_filter_search( $search, $a_wp_query ) {
if ( !is_admin() ) return $search; // work only in the dashboard
$search = preg_replace( "# OR \(.*posts\.post_content LIKE \\'%.*%\\'\)#", "", $search );
return $search;
}
Note that the regular expression has not been thoroughly tested and may have edge cases when other plugins or themes alter hook into here.
Related Posts:
- Search posts by ID in admin
- Is there a more efficient admin search function/plugin?
- Better search for WordPress admin backend [closed]
- disable admin-bar search field for specific roles
- admin : search custom fields
- Search Only Works when Logged into Admin
- What are the standard admin CSS id/class tags?
- how to know if admin is in edit page or post [duplicate]
- How to remove entire admin menu?
- The website cannot display the page
- Set Default Admin Colour For All Users
- How can I target WordPress 3.8 new interface MP6 with CSS?
- Settings API – easiest way of validating checkboxes?
- initial sort order for a sortable custom column in admin
- Uploading files in admin panel?
- Redirect Admin User in Dashboard
- How to change WordPress default strings?
- Remove ability to access certain admin menus
- Gutenberg “Add Block” button is not active (greyed out), cannot add new blocks
- How To View Site from Non-Logged-In User’s Perspective
- Conditional check for front-end which includes ajax
- Hide update messages from non-admin users?
- Reorder plugin items in the admin menu
- Wrong url in sortable column headers & pagination in the admin, when behind a proxy
- Reference external file as a function
- “Automatically add new top-level pages” Default
- Is it possible to hook AJAX to UPDATE-button?
- Get email address of type Administrator
- Check if user is logged in else login page
- Which hook for processing plugin page form data?
- Calling a shortcode in the backend
- Add tabbed menu to admin page
- Is there a way to have admins that are logged in to wordpress not have to enter the password for password protected pages while browsing the website?
- WYSIWYG – Getting the “link” button from HTML mode in Visual mode
- Error thrown. Cannot create references to/from string offsets
- How to receive security update notification email?
- Include admins in author drop-down on edit post screen
- How can I restore admin capabilities?
- How to restrict wp-admin and prevent upload errors
- Admin page redirect to another admin page
- How to determine if an admin is logged in outside the loop
- What determines whether admin toolbar is shown to a logged-in user?
- Adding text in more than one language (at the same time)
- How to get view count of every page on site and add that (increasing) number to Dashboard Widget
- How do I remove All and Published if not admin?
- How to disable https from wordpress site?
- How make a custom search on backend in WordPress without plugin?
- Apply permissions per post
- Where should I hook into admin?
- Dashboard menu missing
- How to remove wp panel for users
- Admin role not really admin
- Fixed layout for admin section
- Featured image on post edit page not loading over HTTPS
- Copying WordPress site, HOW about the DB connection?
- How do I diagnose a plugin resource 404?
- Add menu item to edit specific page
- Directly editing content on webpage, is it possible?
- How to disable Media Library uploads for non-Admin users?
- Page can’t hand request – HTTP ERROR 500 – when updating something
- Admin user lacks admin permissions after hack and can’t reinstate
- How to change the User name and Password of admin account
- Redirect public site to another one but allow administrators to access the old site
- “sufficient permissions” error for admin after duplicating WP database to new install
- Posts in sidebar only by admin
- Display an image of selected template in admin to aid user when using complex templates
- How to remove the default checked attribute from inputs in admin?
- Passing state from child component to parent component in a Gutenberg Sidebar
- Admin user column sort by numeric meta key
- Shop in Subdomain feeding main domain order in admin area
- Can I retrieve Published changes when changes have been Saved but not Published in WordPress Semplice?
- Error 404 Display on otherlinks apart from homepage
- I can’t access login page
- Admin Access for specific page(s)
- Get Link of Page Selected through a Select Field in Custom Admin Page
- Sortable admin columns by 0.00 number
- WordPress Admin Thickbox: Remove Margins/Padding
- how to disable the e-mail verification on wp-admin/options-general.php multisite admin e-mail
- How to change the title attribute for the WP logo image on wp-login.php
- WordPress Admin Email
- conditionally update css on edit.php
- Simple CSS admin pagination
- Can I show the tag admin interface on a post when logged in as an admin?
- WordPress “Hide WP” Gives Me Error After Admin Login [closed]
- Editing post in admin panel
- Making a custom upload form and page in the admin section
- site admin for subscribers
- Customise the add media pop-up to include rel attribute option
- WordPress gallery image link gives 404 when not logged in
- Remove “minor-publishing” div from Publish admin metabox
- How to fix broken admin Thickbox?
- New User Notification – Setting Email
- Pull Random Images From Options Page [closed]
- You do not have permission to access this document on form submit
- Woo Commerce Settings for Check-out Form [closed]
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen
- 2FA for admin login only, is it doable?
- Add a user to edit the layout of a site
- CSS Styles specific to Admin Sidebar not loading
- Display notice in block editor after wp_insert_post_data hook