3
I need the summary size of the posts in my Frontpage to be different from the summary size of the page where all posts are displayed(home.php
).
In my file functions.php
I put the following code:
//adiciona um novo tamanho de resumo de posts
function novo_tamanho_do_resumo($length) {
return 15; //15 palavras
}
add_filter('excerpt_length', 'novo_tamanho_do_resumo');
The problem with this code is that the summary has 15 words on all pages, however I need it in frontpage.php
be 15 words, and in home.php
have 100 words.
I tried to do this way, but this always falling in the second "if ( is_home() )" getting on both pages 100 words... my code is exactly like yours, just fixed the function is_frontpage() to is_front_page(), because it was giving an undefined function error.
– Guilherme