Only hook the function if its not the backend.
if( !is_admin() ){
add_filter('pre_get_posts','my_filter_the_search',10,1);
}
Related Posts:
- On update or create post redirect to current post position in list
- Custom post type isn’t working
- Function to add custom HTML into head in custom post-type list page
- Custom Post Type with Templates using Meta Boxes?
- Adding HTML tags or css classes to admin columns
- Can I list a custom post type within another custom post type in the admin area?
- Change custom post type slug from plugin options
- Create a page that will be used to create a custom post type
- Customize my custom taxonomy table in Admin panel
- Get parse_query filter to return slug instead of id
- Custom Post Type Nav to Subpage
- Can’t edit custom post type
- Selecting a post in Dashboard
- Custom admin post.php page
- A simple script to allow sorting of custom posts in admin?
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Notify admin on new submit
- Set URL link to featured image of custom post type
- Change CPT archive title
- AJAX load more for different custom post type loops
- PHP variable not regenerating when publishing multiple posts at the same time
- I need to add endpoint for wordpress categories
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- get_post_meta not working on publishing
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- Display featured image from one CPT within another CPT query
- Query taxonomy of taxonomy of custom post type
- Best way to style first post differently?
- Options page – dropdown of users
- How to make custom posts types display when published for the future
- How to rewrite url for any specific taxonomy?
- create a new page from a custom post type similar to an authors page
- CPT archive admin menu label
- Anon function and add_meta_box
- No Permission to add new Page, Post or CPT with Admin role
- Hide a widget inside a div on specific type of post
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Admin Column does not populate with data
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Cannot save CPT meta box
- Filtering posts list table
- CPT Validation to not show “Post updated.”
- Allow users to create posts without logging in?
- How to change permalink to include custom post type
- Edit Custom Post Type on Custom Admin Page instead Post Admin
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Add term to custom post type on draft
- How to assign classes to all elements?
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- Load scripts based on post type
- Different Category system needed for the Custom Post Type
- Global custom meta box
- Template not working for the custom Post type
- Warning: Invalid argument supplied for foreach() [closed]
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Featured Image field not appearing in Custom post type
- Add a ‘guide’ image to custom post type admin page
- Post-thumbnail only for specific post-types?
- custom post type metaboxes not saving
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Enable taxonomies by post type in an array of CPTs
- PHP question: how to combine syntax?
- Loop increase number
- custom post for slider
- Use remove_meta_box conditionally on custom post type
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- ACF in wordpress
- Change Slug of a Custom Post Type
- Excerpt function for any content
- Assign category a default post type
- Navigate posts with different post type that are in the same categories
- How to group navigation items in the admin panel
- List of all entries of custom-post-type: Add year-parameter?
- Add an Outside Wrapper to my Header and Make it Full Width
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- Page Template Dropdown For Custom Post Types
- Showing custom post type categories in the menu
- How to use a variable as a function name?
- How to check if post/page or taxonomy post is published by admin
- Show Custom Message in WordPress Admin
- Linking to Post Types from wp-admin
- Plugin or method of allowing user to rearrange custom post types with drag and drop?
- CPT Columns doesn’t show categories
- Insert Custom Post Types
- How to inherit field value from parent post into in child / sub post
- sortable columns for multiple custom post types not working
- How exclude or skip post type with get_next_post_link
- Custom Post Type – Support “author” only for admins
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Create short URL with auto 301 redirect
- Showing User’s Post Counts by Custom Post Type in the Author.php?
- Custom post type’s posts are not showing anywere but in xml sitemap