I'm trying to output an excerpt from the first flexible field. This should be placed in an post preview.
Currently, I've created a website where each content item, is a flexible field item. So the entire page is build as this:
Loading each item as a template-part.
The Posts section is the section that loads the posts. In that template part is a loop that loads those posts. Those are the posts where the excerpt should be placed in.
But the excerpt should be from the Text template part. Which is also loaded with a Flexible Field.
Now currently I have this in the "posts_row" Flexible Field:
'post', 'posts_per_page' => 3, 'category__in' => array (3,4,5), ); ?> have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?> ID), 'full' );?>
As you see, I've placed the excerpt code in there. That code works fine in a page on its own. But not when loaded with a Flexible Field.
In the "text_row" is a sub_field: "content" that outputs the text of that flexible field.
How can I excerpt the first "text_row" > "content" from that post?
My question might be a little vague but this is the best how I can describe it.
Thank you in advance.