Get WPFTS Pro today with 25% discount!

[Solved] How to fix "Home > Results for ..." issue for Divi

Bugs and Fixes
1 1 165 1

  • Since Divi represents breadcrumbs as a part of the post/page content, you can see a strange "Home >> Results for <search term>" text in the each item on the search results page.
    It's annoying. However this is the simple dirty fix for this problem.

    add_filter('wpfts_index_post', function($index, $post)
    {
    	global $wp_query;
    	
    	// Cut breadcrumbs out of the post_content
    	if (is_string($index['post_content']) && (strlen($index['post_content']) > 0)) {
    		if (isset($wp_query->query_vars['s'])) {
    			$subs = '~Home\s+»\s+Results\s+for\s+'.preg_quote($wp_query->query_vars['s']).'~';
    			$index['post_content'] = preg_replace($subs, '', $index['post_content']);
    		}
    	}
    	
    	return $index;
    }, 50, 2);
    

    Simple add this code to the functions.php of your Divi-child theme and this will remove prepend text from search results.

Suggested Topics

  • No PDF results

    Bugs and Fixes
    2
    0 Votes
    2 Posts
    61 Views
    EpsilonAdminE
    Hi @ultraman Thank you for your message. Since you can see results in the Sandbox, the index is fine. No need to rebuild it again. The problem is on the "display results" side. With your configuration, the first idea I think is to install the pre-release WPFTS version that contains the latest fix of the Divi Addon for WPFTS. I've sent you the link in private messages. Please install it and tell me if it works fine or not. In case it still does not work, please tell me which version of Divi Theme you are using, the WPFTS plugin version, and also please explain your search behaviour. Simple try the request like this: https://yourdomain.com/?s=<search_phrase> And notice if it returns any result. Thank you!
  • PDFs not appearing in search result

    Bugs and Fixes
    2
    0 Votes
    2 Posts
    768 Views
    EpsilonAdminE
    Hi @blixhavn Do you remember which plugins you've installed recently? Some of them may conflict with WPFTS Pro, especially when making a search at the front end. Please try to disable those plugins temporarily. If it does not help, let's connect with TeamViewer so I can solve this issue faster (write me a private message or via Live Chat at the main page).
  • Unable to translate "Search" widget

    Bugs and Fixes
    3
    0 Votes
    3 Posts
    921 Views
    R
    I am using the Pro version. My registered email is : sita@cavernas.org.br
  • Number of search results

    Bugs and Fixes
    5
    0 Votes
    5 Posts
    1k Views
    W
    i feel stupid now...YES! It works...
  • Search Results - BOOLEAN Operators and Relevance

    Bugs and Fixes
    2
    1 Votes
    2 Posts
    877 Views
    EpsilonAdminE
    Hi @Nick Yes, the algorithm thinks the number of words here is more important than the exact phrase... Ideally, if we could justify the relative weight for the phrase matches. Currently, it's too low for your case, but I think if we can double it, this could solve the issue. I think to put this parameter to settings in the near future. Thanks!

Be the first to read the news!

We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

Join Us Now!

We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

ewm-logo-450

The forum powered by NodeBB | Contributors