You can use template_include filter hook to check if the current call is a search call and if so include your own template in which you can do what ever you want :
add_filter('template_include','my_custom_search_template');
function my_custom_search_template($template){
global $wp_query;
if (!$wp_query->is_search)
return $template
return dirname( __FILE__ ) . '/my_search_template.php';
}
Related Posts:
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- How to make dynamically-generated content searchable in WordPress?
- Displaying search results in the widget itself?
- modify wordpress default search
- what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?
- Search the product by tag or category not working
- Search and Filter
- Using ob_get_content to get_search_form puts into infinite loop
- Showing results from json-string in WordPress search results page
- Ajax action has 200 status but response of No response data available for this request
- ajax stopped working when not logged in wordpress
- Get search result count in plugin
- Generate Static Page to Show Search Results/Detail for API
- Modify search form with plugin
- WP Query Relations / Compare
- WordPress Search Form with Keyword Suggestion
- Simple Search Plugin Does Not Perform Search
- How to search on the field that stores escaped strings?
- Change the search results header from plugin
- How to create a custom search form and handler?
- Get custom wp_query search results to appear on search.php
- Why is WordPress wrapping search for users that looks like integers with asterisks and how do I fix it?
- Hook a search form anywhere on the site, using a custom plugin
- Update Option Stored in Multi-Dimensional Array
- check if Gutenberg is currently in use
- WordPress Plugin Development – Headers Already Sent Message
- Get page content using slug
- How to include wp-load.php from any location?
- Correct way to enqueue jquery-ui
- How to echo the_excerpt without the P tag wrapper?
- How can I update a wordpress plugin from a Git repository (github)
- $wpdb->insert_id
- Remove profile picture option (and other things) from profile.php (in admin)
- How to disable plugin update notification for a specific plugin in Multisite
- Getting old term value with edited_{$taxonomy} | Hook
- Building a better media uploader for WordPress
- Problems with localization
- Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?
- Singular name Plugin localization
- On plugin deactivation hide its shortcode
- Can I submit a plugin that follows the PSR-2 coding style guide?
- How to get current page id through the plugin
- Properly licensing a plugin that uses Apache 2.0 licensed code
- How to restrict plugin’s sub-menu pages to admin/subscribers?
- Saving data from block editor to the database
- Cannot search post by taxonomy
- OOP Plugin and Menu – Call to undefined function register_setting()
- Will current_theme_supports return TRUE with a nonstandard add_theme_support?
- How to untrash a post only if it was not a draft?
- Display content from custom post without modifying the single template
- How do I add custom column to woocommerce cart?
- Writing a plugin which needs to upload files
- Calling is_single() outside the loop
- update woocommere total value on checkout based on selected payment method
- Loading WordPress Admin Environment
- how to add custom functionality after woocommerce place order button
- Problems with: manage_${post_type}_posts_columns
- Getting timestamp of activation plugin time
- Rich text editor settings persist throughout all rich text editors
- Function: Add link to / inside div
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- WP Gutenberg Blocks – How to limit first/root blocks
- How do I update a field of a meta box?
- Following WordPress Markup Is mandatory, got awkward resultyby wordpress standard markup?
- How to Get Current Custom Post Type Associated Taxonomy Term
- How do I add a favicon that only shows during viewing of my plugin’s admin panel?
- Can’t get CSS Into the Head via add_action
- Remove Default Blogroll Links via Plugin script
- Empty Pdf file generated with FPDF library in WordPress plugin [closed]
- Filter posts in pre_get_posts order by meta value date (desc or asc)
- How to display the category id along with category name on categories list?
- My plugin won’t create table in wordpress 3.5
- Remove Permalink Meta Box not working?
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- Modify custom block plugin without losing content
- How to replace the existing metatag using the backend to insure a thumbnail image gets fetched when we share on social media?
- When setting styles to an extended block that was saved as a pattern, it doesn’t remove the style that was there
- apply_filters() and call_user_func() to define and call a function outside a class
- HTML Elements in my WP Plugin being generated in JS. Security and Translated Text Question about this method being used
- Sanitization and validation input fields – Settings API
- Author Meta in Author URL Link
- Warning: Illegal string offset ‘Andorra’ in … on line 106
- Different style for specific rows in custom list table using WP_List_Table
- wordpress4.8.2 Multilingual Plugin
- get_comment_meta() for a filter hook in a plugin
- form does not generate $_POST request
- Callback function quicktags that uses variable in start tag
- Font Awesome stopped showing icons, shows &# text instead [closed]
- WordPress Plugin Tool Tip Helpers
- How can I add the Post ID to Class Name in Jquery?
- How to show metabox just in post.php in admin?
- $wpdb how can i save my postmeta table before querying it
- Create dedicated page with custom template showing custom data
- Can’t switch theme after activation
- plugin will not offer update even though a new version is available
- WordPress plugin: admin-ajax.php not passing data to custom function
- How do I replace title with my plugin?
- Enqueue Script in custom plugin before other
- How to remove a class [closed]
- How can I dynamically change title and description in WordPress?