Archived topic
Search page don't display the excerpt and the more button in items type of page
3 replies · Started by Javier on July 30, 2020
Hi.
I have a problem with the search results page. The items that correspond to a page are missing the except section and the more button. When the item is a post, they are fine, it shows the excerpt and the more button.
The section of Customize > Layout > Blog is well configured, I think.
If you search the term "trabajar" you will see in the third row what I mean.
I have autoptimize installed if this is relevant for the solution.
Best Regards,
Javier
Hi there,
WordPress doesn't store excerpt by default for pages and I'm not sure if there is a way around that.
Would it work if we only include posts in the search results?
Hi Leo.
Sadly this solution wouldn't work.
I have searched a solution but the only solution that I have found is to activate the excerpt to pages and populate it manually.
Is there any workaround or plugin to do this? If not, could you tell me what I can do to only include post in the search results?
Best Regards,
Javier
I have searched a solution but the only solution that I have found is to activate the excerpt to pages and populate it manually.
I believe that's the only way but you shouldn't need a plugin to do it. Check out the function in this article:
https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/
It can be added using one of these methods:
Adding PHP: https://docs.generatepress.com/article/adding-php/