• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/site/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/site/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/site/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Get excerpt from first Flexible Field, in a Post (ACF)

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' );?>     
cat_name; ?>

lees meer

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.

Download script demo [LINK] [Origin]
Download script demo [LINK 2] [Onedrive] Download script demo [LINK 2] [Google drive]