Thank you @crouchingbruin for your help.
That worked, but now a new “problem” has come.
In the content-search.php file the function the_excerpt() is called. This function take the content of the page, cut it if it is too long (55 words by default) and apply several filters by means of get_the_excerpt() function.
Both the functions are contained in wp-includes/post-template.php.
Since I have lot of long pages, it is not very good to display all the page content in the “search results” page.
In the “search results” page I would like to display only the first part of the page (default 55 words is a good length) without filtering the text styles.
Is this possibile?
What would happen if a text style tag is opened with the 54th word and closed with the 56th word? For example say that the words 54 55 and 56 are <strong>this bold text</strong>
, in the “search results” page would it just be displayed like <strong>this bold
or it would give an error?
If there would be an error, since the first line in all my pages doesn’t contain any text style, is it possible to only show the first line of the page in the “search results” page?
Thank you very much7
Now I’m studying the functions the_excerpt() and get_the_excerpt() to understand how to customize the excerpt.
-
This reply was modified 5 years, 5 months ago by giannit.
-
This reply was modified 5 years, 5 months ago by giannit.
-
This reply was modified 5 years, 5 months ago by giannit.
-
This reply was modified 5 years, 5 months ago by giannit.