How to change tab’s title in search results pages? [closed]

You have to hook into the document_title_parts filter to adjust it to your needs. Example: /** * Modify the document title for the search page */ add_filter( ‘document_title_parts’, function( $title ) { if ( is_search() ) $title[‘title’] = sprintf( esc_html__( ‘“%s” result page’, ‘my-theme-domain’ ), get_search_query() ); return $title; } ); For Multiple paged search … Read more

Media searching ignored

WordPress doesn’t search images by their file names. It performs a search based on Title. By default titles are generated automatically from file names, but it can be changed in editor by users.

search form redirects to home

I forgot that in my function.php I had a kill function that was redirecting to home.php my search. I just needed to delete search from the function below /* Kill attachment, search, author, daily archive pages ———————————————— */ add_action(‘template_redirect’, ‘bwp_template_redirect’); function bwp_template_redirect() { global $wp_query, $post; if (is_author() || is_attachment() || is_day() || is_search() || … Read more

Creating a Searchable PDF Archive of Publications

Although this is not the place for plugin recommendations (too much personal bias, I guess), I have used the WP Google Search plugin https://wordpress.org/plugins/wp-google-search/ which integrates with Google Custom Search Engine. All you need is a free Google CSE key; enter that in the plugin’s settings, and that’s it. Seems to work well with the … Read more

How do I add custom fields data to a search index?

Try adding the following code snippet to your functions.php file: /** * Extend WordPress search to include custom fields * * https://adambalee.com */ /** * Join posts and postmeta tables * * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join */ function cf_search_join( $join ) { global $wpdb; if ( is_search() ) { $join .=’ LEFT JOIN ‘.$wpdb->postmeta. ‘ ON ‘. $wpdb->posts … Read more