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
- How to change default position of WP meta boxes?
- Displaying Custom Post Types In “At A Glance” Meta Box
- Display a query with multiple post types and same relationship on a single page
- how to group custom post types
- Custom post type admin search
- Ordering posts by custom taxonomy in admin area
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- echo value from ‘select’ field type into page template using cmb2?
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Exclude Custom Post Type & Pages From Auto-Tag Function
- How to add post_author column to custom post type
- Only Show an Author Their Custom Post Types
- Admin List Dynamic Heading
- Beginner question: Accessing functions.php through admin web interface in order to import custom post types?
- Settings page above CPT page in admin section
- How to search CPT’s by meta query from the admin dashboard?
- Add theme options to custom post type admin pages [closed]
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Need functionality with all post list available at edit.php
- Changing ‘view’ link for custom post type on list post screen?
- Sort admin area by custom Event Date field
- How to change the admin menu “Pages” to something else
- Apply post formats to a specific post type only?
- Loading all files within a directory
- Add html to cpt main page / admin edit.php
- Custom Post Types relationships
- Copy custom field value to post title
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- What’s the difference between same wp functions get_posts(); functions in different form?
- Function to display custom post type on front page makes menu items dissapear
- Custom Post Type with Templates using Meta Boxes?
- Can I list a custom post type within another custom post type in the admin area?
- Customize my custom taxonomy table in Admin panel
- Notify admin on new submit
- Redirect 404 page with ID in slug to associated page with same ID in slug
- Display featured image from one CPT within another CPT query
- Anon function and add_meta_box
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Admin Column does not populate with data
- Allow users to create posts without logging in?
- Load scripts based on post type
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Post-thumbnail only for specific post-types?
- custom post type metaboxes not saving
- Enable taxonomies by post type in an array of CPTs
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- Showing custom post type categories in the menu
- How to use a variable as a function name?
- sortable columns for multiple custom post types not working
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- Add ‘page template’ column to dashboard for CPTs
- posts within custom post type all share the same content in the front-end
- Shortcode to return single custom post based on post taxonomy
- Filter posts of custom post type by meta key in (List All Section)
- Using Wp_Query, Json to add Highcharts series data
- Send post changes to set email addresses (not users or subscribers)
- Let users upload image(s) to the post from front end
- Foreach loop returning more than one item when querying taxonomy
- Have custom post type Visibility be private by default, and have radio button also set to “Private”
- Require custom post type if is_admin() – template doesn’t show up?
- Sorting custom post types in edit.php : Post disappear
- display custom portfolio tags
- Page template that uses lightbox to display post images
- Function to allow single post template based on custom taxonomy?
- Metaboxes inside Tab
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Custom Form / Search with Custom Post Type Data
- php dynamic content inside shortcode
- Check that a slug is present in the get_terms request
- Custom attachment function not working in v5.4.2?
- CPT tags not showing when editing post
- Persist meta box choices throughout all posts of same post type
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Function to redirect singular post if specific meta field is empty
- Function for when new custom post type is created should do something
- When post is Published, insert into custom table a number – custom post type
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Pagination fault in custom post type archive page [duplicate]
- How can i call a custom method on submission of a custom plugin post type?
- Set the Title of a Custom Post Type by code as Author’s Username
- Function not pulling image or text from custom post type
- Custom Post Type Causing Admin Sidebar UI Issue
- Rich Custom Field for Custom Post type not saving
- How to change the default orderby from “Date” to e.g. “Title” or my custom column in content type records list in admin?
- Change column of row action (Quick Edit) links in WP_List_Table
- Custom Loop for custom post type. Compare by meta_value?
- Prevent users from changing post status
- Post AND page parameter for WP function
- Custom Plugin w/ Custom Post Types – Custom Posts Are Showing at all Privilege Levels – Is this possible to adjust?
- How to string lines from the_content() hook in WordPress?
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- How to set the Screen Options for Users in the Admin Panel?
- How to use wp_set_object_terms depending on page ID?