Hi @effingpot
Have you tried asking in the theme’s dedicated support forum: https://ww.wp.xz.cn/support/theme/levii
See https://developer.ww.wp.xz.cn/reference/functions/the_excerpt/ to find out how to increase the length of the_excerpt.
You should not modify files in the LEVII theme; create a child theme for template file in question.
https://codex.ww.wp.xz.cn/Child_Themes
Jose – thanks didn’t know that was there.
Steve – I’m afraid reading that is leaving me knowing what I don’t know 🙂
I’ll go through it a few times but I’m not sure I understand it :-{
Rgds
Mike
-
This reply was modified 9 years ago by
effingpot.
Haha – so it looks like you find the post-template.php file and edit it – so far so good!
From the link you sent it looked like I could change the 55 example to 200 like this – I added the bold stuff. But got an error, so I put it back how it was as I clearly have no clue what I’m doing and could be danger to http://www.friday-fun.com/wordpress where I am building it.
function the_excerpt() {
/**
* Filters the displayed post excerpt.
*
* @since 0.71
*
* @see get_the_excerpt()
*
* @param string $post_excerpt The post excerpt.
*/
<strong>function wpdocs_custom_excerpt_length( $length ) {
return 200;</strong>
echo apply_filters( 'the_excerpt', get_the_excerpt() );
}
-
This reply was modified 9 years ago by
effingpot.
OK making some progress now – I realise I had to add that whole piece of code, which I did and all worked with the 20 per the example. I changed the 20 to 2000 and for text entries I now get more text – but the formatting is lost. (See the ACHTUNG entry).
For the entries which include a video – like the first one or two, the video is still hidden behind the SEE MORE. I suppose this is only allowing more TEXT when what I am trying to do is not shorten it at all, or shorten by physical length, whatever the content.
Maybe this excerpt route is the wrong way?
thanks
Mike
excerpts do not have formatting. If you want the whole post, formatted, use the_content() instead of the_excerpt()
OK sounds fine – sorry to ask but how do I do that?
thanks
Mike
In the template file that renders the posts, replace the_excerpt() with the_content().
Find the right template and copy it to your child theme. Use the plugin “Show Current Template” to help you find the right file(s).