Archived topic
How to add excerpt to pages
3 replies · Started by anabella on May 20, 2019
Hi, I need to add an excerpt to the pages on my website (or somehow find a way of improving what is shown in archives when a person uses the search box).
Could you please let me know how to do this?
I am using Generatepress Premium and I haven´t created a child theme.
Thanks in advance
Hi there,
what exactly would you want to display on the Search results page? Would this content be the same for all searches?
Hi David,
Thanks for your reply.
I have created a Search Box (you will see it on the main navigation) and I am not satisfied with how the search works: whenever I look for a keyword (for example "via ferratas") I get a list of the pages where this keyword was found, but I don´t find this very helpful, because the visitor would literally need to read the whole page in order to find that keyword (as it isn´t highlighted or anything). Do you have any advice related to this?
That is part of the problem. The other part is that (when I land on the results page) the excerpt literally includes whatever was written at the beginning of the page, all together and without punctuation marks (so, in some cases the content doesn´t even make sense), that´s why I am looking for a way of improving at least that text (excerpt)
The first part is very complex - a plugin like Relevanssi may provide what you're looking for, please note though their comments about databases sizes:
https://en-gb.wordpress.org/plugins/relevanssi/
Simplest way to keep HTML within the excerpt is another plugin like so:
https://en-gb.wordpress.org/plugins/advanced-excerpt/
I know it works with the GP templates - i would like to think it would work with your Elementor archives.