Strange Line Break effect at Search Result Page

Since the update, the entries on the search results page have changed. As you can see in the graphic, some page excerpts show up ( \n\n) double line breaks in the text.

I use the Relevanssi plugin but that can’t be the problem, otherwise all search results would be affected.

I have noticed that this effect appears on the pages which I created after the major update. So something must have changed that I can’t comprehend.

What can I do about it.

Hello Guido,

Thanks for posting in! This issue could be caused by a plugin conflict, amongst other things. Please check out this troubleshooting article here and follow the instructions for the following sections (where appropriate):

Testing for Plugin Conflict
Theme Update
Child Theme
CSS/JS Customization
Increasing PHP Memory Limit
Disabling Cache
Disabling CDN

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.


I tried to access your site dashboard, unfortunately, the given login details are not working. Please recheck and send us again.


Hi Guido,

The search results display excerpts. And WordPress generates plain text when displaying the excerpt, it will remove all shortcodes and HTML. But some could bypass if it contains malformed content, or other 3rd party plugins is appending some content.
The solution is adding text excerpt manually into your post(s) or page(s).

And since pages, do not have an excerpt by default, you will have to add custom codes into WordPress to be able to insert a page excerpt.
Please go through this link to guide you to do it:

Please follow the steps:

  1. Add this line to your child theme’s functions.php which adds the excerpt option to your pages.

    add_post_type_support( ‘page’, ‘excerpt’ );

  2. Edit your page or post and scroll to the very top and click Screen Options, make sure the Excerpt toggled is on
    Scroll down and find the Excerpt meta box section and there, add your text excerpt.

Hope it helps.

Thanks for the answer. That I can create the excerpts manually has already been clear to me. What interests me is, why pages created before the last major update do not show this \n\n behaviour. There must have been some change in your coding. Is there perhaps another search plugin with similar features to Relevanssi that works with X-Theme and is recommended. That would be crucial for me as a web service provider.

Hi Guido,

I suggest that you will just use the default WordPress search functionality so that you will not depend on the 3rd party plugins that conflict with your website.

Hope that helps.

Thank you.

Meanwhile, the \n\n line breaks also appear under Rank Math SEO . The Relevanssi Author has even created a javascript for me - without success - it comes from the generated X-Theme code - is there a solution for this? Here is the filter for the functions.php:

add_filter( 'relevanssi_excerpt', 'rlv_modify_excerpt' ); function rlv_modify_excerpt( $excerpt ) { $excerpt = preg_replace( "/\n\r|\r\n|\n|\r/", ' ', $excerpt ); return $excerpt; }

Has no one else noticed the issue?

Howdy, @OPTIMGO! Thanks for writing in…before proceeding any further, can you please try updating to yesterday’s release and see if that addresses everything? We have some filtering going on with the excerpt based on some needs in the Builders, so what might be happening is another plugin is trying to provide an excerpt automatically instead of our code. Prior to yesterday’s release, our builders were not providing an excerpt generated from the builder content. Once you’ve updated, let us know if that resolves the issue. If not, we will be happy to continue to take a look into this.


Unfortunately no change after the update. Within the Relevanssi search results there are still a lot of \n\n visible and RankMath shows them in the Description section.

Hi Guido,

It happens if you copied the content from any external files like .doc or .docx which converts the line break as \n. To check it further we required your website credentials.
Unfortunately, the previously given login credentials are not working. Can you please provide login credentials for your site in a secure note to examine, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.


I never use Word I write everything direct at the page.

Hey Guido,

It looks like this has something to do with how the Headline is being outputted in the new version but only in your site. This issue doesn’t happen to any of my test sites.

Please copy your site to a staging server and give us access to the staging site and we’ll investigate deeper. Then, downgrade Pro in your live site so you won’t have this issue.


Staging Server credentials sent as secure note

Hello Guido,

I have deactivated the Relevanssi plugin temporarily.

It seems that the plugin is causing the issue. Please check the secure note or your search results now.
You may activate the plugin again so that you can compare the result.


Yes, that’s right by disabling Relevanssi it is no longer there in the search results. However, in RankMath it is still there, as you can see in the screenshot.

So it seems to affect the excerpt after all.

What about compatibility with RankMath? Because it is also not recognising headlines or internal links?

Is there without Relevanssi also a possibility to Highlight the searched term?

Hello Guido,

Thank for updating in! With RankMath, it is still the same. Both the plugins are manipulating the post contents which adds \n characters. Please contact the creators of these plugins and also let them know about this issue.


Thanks for the confirmation and the effort up to here. I can’t believe this affects just me, as these two plugins are very popular. Would it make sense to rebuild the entire site? This is the first Pro-Project and there are many more to follow - and I want a working workflow.

What I also noticed is that no matter how I create a layout for a single page and assign … when I want to build a new page based on it - there is no preview area and I can’t add or change any content.

I went through the dodumentation step-by-step and watched all the YouTube videos and I can’t create a layout.

Currently I have made myself normal single page pages which I call 1-O Page Template for example. If I then create a new page I insert my RAW content (Load Template) and replace everything for the page - texts images , etc.

This has the disadvantage that if I change the 1-= Page Template I have to make the change to the other pages as well.

With layout I assumed that I can save that. I thought I can make the following workflow:

1- Create a new layout with the fixed elements that should appear on each page based on it.
2- I go to PLUS via Content and make a new page. Here the layout content is already there.
3. i add more content depending on the page. Save
4. Finished and can be piblished - next Page

My Workflow:
then I ad an Image an a Text

Then I save an and the condition
to create a new page based on that test I change to content and make a new page


and the result is:

I cant do anything - but he changes all of my existing pages till I delete the created Layout.

What am I doing wrong?

I went through the dodumentation step-by-step and watched all the YouTube videos and I can’t create a layout.

UPDATE: Just finished a new website based on X-THEME - also here the same problem with the \n\n line breaks at the excerpts under RankMath - Relevanssi isnt’ installed.

Hi Guido,

I have tried to check your problem with Pro and the Layout Builder but the previously provided credentials do not work anymore. I would request you check the credentials again let us know to check it further. I would also request you provide the credential for your X theme site to check the issue with the plugin you mentioned.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.