Get WPFTS Pro today with 25% discount!

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


  • 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

  • Link URL showing up in search results.

    Bugs and Fixes
    6
    0 Votes
    6 Posts
    139 Views
    EpsilonAdminE

    Hi @jgregory_ca

    Okay, the fix for Avada addon should be ready in a couple of days. Just FYI.

    Thanks!

  • PDFs not appearing in search result

    Bugs and Fixes
    2
    0 Votes
    2 Posts
    582 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
    742 Views
    R

    I am using the Pro version. My registered email is : sita@cavernas.org.br

  • "Prevent Direct Access" Plugin

    Bugs and Fixes
    8
    0 Votes
    8 Posts
    1k Views
    N

    Thank you so much. We'll try this, and I'll let you know the results.

  • Sorting of Search Results

    Bugs and Fixes
    5
    0 Votes
    5 Posts
    1k Views
    N

    We have over 1,000 pdf documents on our website, and the most important is our Journal, with 238 editions at present. As an example, a couple of issues of our Journal are here, but they are all similar in structure:
    https://rchs.org.uk/wp-content/uploads/2020/02/Journal-100-Nov-1975.pdf
    https://rchs.org.uk/wp-content/uploads/2020/02/Journal-001-Jan-1955.pdf
    You will see that at the bottom of the second page of Journal 100 is a table of contents for the issue and, if the pdf is saved and then opened in Acrobat Reader, there is an equivalent set of bookmarks. It would help if a search term appearing in the article title (as listed in the table of contents) was given a higher weighting than one in the text of the document, but quite often the term will only occur in the text, and not in the title at all.
    Ideally, we would like the weighting to be based upon articles, but weightings based upon the the whole Journal is acceptable. This is because the articles tend to be on unrelated topics within a Journal, so there is probably little difference between the number of instances of a specific search term within an article, and within its parent document.
    I think it would help me if you could explain, in non-technical terms, how the four weightings operate with WPFTS. I've looked at the TFIDF article on Wikipedia, and understand the basics, but the majority of the article is too technical for me. Perhaps this information could also be added to the WPFTS documentation?
    As a related issue, could WPFTS open the document listed in the search results at the first article page where the search term is found? I realise it might go to the article title instead, and if so that wouldn't really help much.

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