Site search

I have been using the x theme for several years now. All the sudden the theme based search returns are whacked out. Please see the attached screenshot of search returns from an existing site I developed a couple years ago. Then view the screenshot of a recent project and view the returns. WTH is going on with that? I am sure it is something easy that I am missing.

Please advise. Thank you.![

Capture1|567x500](upload://8Btq6SdYaKkanfvyqrXspoJq3s6.jpeg)

Hi @kstidham,

Thank you for reaching out to us. This could happen due to incompatible versions of X and Cornerstone, make sure both are updated to the latest versions, you can find out the version numbers here https://theme.co/docs/version-compatibility. If the issue persists then please check for the following first:

  1. TESTING FOR PLUGIN CONFLICT
  2. THEME UPDATE
  3. CHILD THEME
  4. DISABLING CACHE
  5. DISABLING CDN
  6. VERSION COMPATIBILITY

If you still have problems then please get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case.

Thanks!

Hello @kstidham,

Thanks for providing the information. I have inspected your site and tried the search. Most of the results were coming from the pages. By default, pages do not have any excerpt which is why the very first 30 words were taken from the page content. If you have inserted a slider, most probably the slider codes were the one that is displayed. You can prevent this from happening by inserting a page excerpt. This will require a little customization though.

Pages are usually used as the landing page, where the post is for blog articles and that’s what separates them. And the theme will adhere to the default standard provided by WordPress. It still doable, but again, would require customization. Example,

https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/ (for adding excerpt support for Pages).
https://www.wpbeginner.com/beginners-guide/how-to-add-featured-image-or-post-thumbnails-in-wordpress/ ( for adding featured image support for Pages)

Once you have modified and added the page excerpt, you will need to edit each of the respective pages and insert a manual excerpt or the excerpt that you want to display in the search results. Manual Excerpts are optional hand-crafted summaries of your page content that can be used in your theme search results.

https://codex.wordpress.org/Excerpt

Best Regards.

Hi Ruenel,

Thanks for your quick response. I read the article about inserting excerpts and still do not understand why we would have to do that. It sound really effort heavy. I have developed many, many websites using x theme and just until the last couple projects has this become an issue.

The following is an x theme site with almost an identical plugin makeup. It has the most current version of the theme, the platform and the plugins - https://www.lschamber.com. Why does it not have the same issue? I have numerous working examples that do not have this issue. Please advise.

Hello @kstidham,

It is not an issue. It is just that when the search results display a page, it will either autogenerate an excerpt which is the case in your original post or it will not generate an excerpt at all displaying just the title which is currently happening in the second site as pointed in the secure note.

You see, you only have a title because it does not have an excerpt.

Hope this explains it briefly.

I guess I am still confused. Why does one site require us to populate excerpts and the other creates its own? I appreciate your assistance. I ask because I have well over 60 sites out there using the x theme and we have never had to do that regardless of the site content or order of site content.

Hi @kstidham,

The Excerpt is an optional text associated with a Post. Most of the time, it is used as the Post summary and only applicable for the post by default. So if your search result is showing the pages with malformed content, you need to add the excerpt manually into your page(s).
As the search results display excerpts and WordPress generates plain text when displaying excerpts, it will remove all shortcodes and HTML. But some could bypass if it contains malformed content, or other 3rd party plugins are appending some content.
And since pages, do not have excerpts by default, you will have to add custom codes into WordPress to be able to insert a page excerpt.

Thanks

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