Create a another filter to remove post title and post content remove search terms
try this if this helpful for you
add_filter( 'posts_search', 'custom_post_search_author_do', 10, 2 );
function custom_post_search_author_do($search, $query ){
if( ! empty($search)
&& $query->is_main_query()
&& !is_admin()
&& isset($_GET['search-type'])
&& $_GET['search-type'] == 'autor'
)
$search="";
return $search;
}
Related Posts:
- How Do I Use WP_Query to Run This Database Query as Search Result?
- How to create a custom search for custom post type?
- what is the correct way to compare dates in a WP query_posts meta_query
- Advanced search form with filters for custom taxonomies and custom fields
- Correctly delete posts with meta and attachments [duplicate]
- Prevent pre_get_posts filter on specific post type
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Search multiple custom fields by using meta_query
- How do I Paginate Search Results for Custom Post Types?
- Search everything (posts, pages, tags, cpt, meta)
- filter search result with custom post type meta key
- WordPress Admin Panel search posts with custom post meta values along with title
- Search results ordered by custom post types are not grouped
- Can’t sort order of wp_query with 2 meta keys
- Having trouble with custom post type / meta box
- How can I include meta box content when searching?
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Custom Post Type, Saving Multiple Checkboxes
- How to create an advanced filter search?
- Multiple meta_values in the pre_get_posts filter?
- Custom post type search using $_SESSION and pre_get_posts
- changing meta value and meta key of price field
- WordPress sort search results by custom order
- Update postmeta Parent when post_status child change
- How do i search authors from search form using author’s name
- how to show records that don’t have custom meta value
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Search CPT Title AND Meta
- How to have multiple search result pages in wordpress with taxonomy terms listed
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Search for custom field input of a custom post type in ajax live search
- How to Disable option of meta field if that option is selected for any other post in custom post type?
- Stored meta from attachment, video length?
- custom search results – order results differently by post type
- Custom Post Search
- pre_get_posts not firing at all
- Advanced search form with filters for custom taxonomies and custom fields
- Custom Post type – how to get checkbox to update meta field to null
- Custom post status not working
- WordPress post sorting with AJAX
- Why have my custom post type searches stopped working after changing URLs / updating WordPress?
- How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?
- Exclude a term of a taxonomy with a custom post type in a search
- Custom Post Types: pretty search URLs and has_archive
- Limiting number of custom posts shown on taxonomy page
- Custom post type category not displaying in custom post type
- How to add multiple featured image in meta box in post editor?
- update_post_meta() whenever custom post type is updated
- Custom Post Type not appearing in website search
- How to get all `supports` attributes by post type?
- Count posts with specific term_meta
- Using pre_get_posts to filter one loop in a multiloop archive
- Weird problem happening with custom taxonmy when creating/updating posts
- List all images from a single post meta value
- Conditional Query of Custom Post Type and custom taxonomy
- Update Post Meta for a logged in user
- Structure of data : CPT + terms
- Include custom post type content in search
- Get post count for search result based on post type
- How to remove post listing page for a custom post type
- Getting thumbnails of a custom posts featured images in a page-templates metabox
- If Post Meta Equals Current Title Conditional Advanced Custom Fields
- Ordering Submenu Pages in WP 3.1
- How to customize work area / admin area in a custom post type without plugins?
- delete_post_meta() for whole CPT / multiple posts?
- Move Genesis Single Page/Single Post Title
- Custom filter for main search: how to exclude specific post_type from search results
- how to get this tax_query working?
- How to group search results by post type and only if post type result is not empty?
- Custom post type’s posts are not showing anywere but in xml sitemap
- Only show columns in custom post type?
- Ideas on how to organize a project [closed]
- How should I structure complex content hierarchies?
- Get all metadata for a given custom post type
- Problems making shortcode with custom post types and taxonomy
- Advanced custom field – posted fields from custom post type
- Add a class to post_class if more than one post shares same meta_value_num
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- Placing Admin Post Metaboxes in Tabs
- Custom fields for post or terms which don’t update on post update
- Change search query in wordpress custom post type
- Why is my custom post content only viewable when signed into WordPress?
- How to use multiple Meta Field from CPT as Post permalink
- Create a post automatically if search result has zero results
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- How to add custom supports for custom post types?
- How to get post detail based on URL of the post
- Linking posts together with Advanced Custom Fields “both ways”
- Change Background Color For CPT Template
- How to add post reference field to a plugin?
- Search page for custom post type
- Custom post type adding additional markup
- Archive custom template from search
- cannot export data from CPT UI (books)
- REQUIRED: The theme uses the register_post_type() function, which is plugin-territory
- Post Meta for Custom Post Types
- display posts, pages and custom post types from another wordpress site
- How to develop Knowledge center in WordPress Website