It's my understanding that the_excerpt()
will display the excerpt, if you have made an explicit one, or the first few paragraphs of the actual content, if you did not.
In my case however, it only shows excerpts when one is declared, never uses a fallback.
I like to know what could cause this? I'm using timber and a foundation theme that I've been developing for the past couple of years. It's well orginized. The only thing I can find related to teh matter is thees parts:
// Exerpt length
function init_excerpt_length()
{
return 24;
}
add_filter('excerpt_length', 'init_excerpt_length');
// Change the suffix
function init_excerpt_sufix($txt)
{
return str_replace(' [...]', '…', $txt);
}
add_filter('get_the_excerpt', 'init_excerpt_sufix');
Witch to me looks A-OK
The code I use whre the problem appears:
$context['blog_posts'] = Timber::get_posts(
[
'suppress_filters' => 0,
'numberposts' => 10,
'offset' => ($context['page'] - 1) * 10,
]);
print_r($context['blog_posts']);
I tried using wp_get_recent_posts
that resulted in the same result.
My thoughts is that this is related to wpml and the messed up import export I just did. But then again, I don't see how this problem could be related to the database.