Search Results & 404 Pages

Hi,

Search Results:

  • How can I remove the author and date from the results?
  • How can we fix the overflowing text?
Summary

http://lumenis6.onpressidium.com/?s=versapulse

404 Page:

How can we change the text, add logo, remove the “assign menu”, remove the plus sign at the top right?

Summary

Thanks!

Hi Amir,

Thanks for writing in! To customize search results, try adding the following CSS rules into your X -> Theme Options -> CSS area.

.search-results .p-meta {
    display: none;
}
.search-results .x-main .hentry .entry-content {
    max-width: 100%;
}

To customize 404 page, please utilize our Custom 404 extension. You can refer to our knowledge base article here (https://theme.co/apex/forum/t/extension-custom-404/80).

Thanks!

1 Like

Thanks, that did solve the issues I described before with the search results. I will try the extension of 404.
Three more things with the search results:

Can we exclude pages/posts from the search results?

Why HTML and scripts appear in the page preview at the search results? This is very not user friendly.

Summary

https://lumenis-staging.com/?s=M22

When no search results exist, a header/footer less page appears, how can we change that to be with header and footer as a search results page with existing results?

Summary

http://lumenis6.onpressidium.com/?s=dsfsdfsdf

Hi @Amir.Caspi

Searches are results from pages and posts, hiding them will make the search of no use. I recommend adding excerpts manually to all your posts. Please check this https://www.wpbeginner.com/glossary/excerpt/

The text excerpt that you’ll add will replace that code content.

As the question why it appears, it’s because of Wordpress handles the excerpt. It will stripped out HTML , shortcodes, and other codes to generate a plain text excerpt. But on this case, it first strips the <script></script> which leaves the code as normal text content. Remember, the code is a code if it’s within <script></script>, without it, it’s just a plain text that just looks like a code.

As for the empty result, please add this CSS as well.

.search-no-results .x-main.full {
    min-height: 501px;
}

Thanks!

  1. I meant how to hide specific pages/post from search results (i.e. thank you pages)

  2. I don’t see how this CSS will solve the issue that whenever someone searches a phrase that returns no result the following page will appear instead of regular looking page:

Summary

https://lumenis-staging.com/?s=dsfdsf

Why it is different from any other regular page with header and footer?
Thanks.

Hi Amir,

If you mark your posts or pages as private on the quick edit view, those will not show in your search results.

Otherwise you can try a 3rd party plugin like Search Exclude (https://wordpress.org/plugins/search-exclude/) though we cannot guarantee the compatibility.

With regard to search header issue, set your header as global and re-test your issue.

Thanks!

1 Like

Hi , I made it global and now it added breadcrumbs to the homepage where I definitely don’t need breadcrumbs.

Summary

https://lumenis-staging.com/

Hi Amir,

You can add a class to your header bar residing your breadcrumbs. For example: my-custom-breadcrumb and then you can add the following CSS rule into your custom CSS area to hide it on homepage.

.home .my-custom-breadcrumb {
  display:none;
}

Hope that helps.

There is no such bar residing the breadcrumbs, thats the problem.
I know I can intentionally add breadcrumbs in the header builder but I didn’t add it in this specific header. Making it global header added the breadcrumbs.

Removing things with through style is always an option but I would like to solve this issue from the source rather than masking it with CSS.
Thanks.

Hi again,

I checked your site and it seems like the breadcrumbs is the part of your header. Please re-check your header and there should be breadcrumbs element present in most probably the fourth bar.

One simple way is to use different header (without a breadcrumb element) on your homepage and make the other header (having a breadcrumb element) a global header.

Hope this helps!

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