Looper provider with meta field from ACF

Hi,

I’ve used ACF to add a extra field on my portfolio portfolio_blog_item which is a page link field. The idea is to link a specific post to the testimonial.

On my custom portfolio item page I create a div with a looper provider, in which I want to display the preview of the blog.
afbeelding

This is not selecting any post, I’ve tried it in a sandbox environment, but there the blog item had a link to the portfolio, so the relation was the other way around.

I think I’m missing something very obvious here, any help is welcom.

Bart

Hello Bart,

Thanks for writing to us.

To help you with your concerns we need to check your settings, I would request please share the admin login details meanwhile I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password
  • Exact page URL

You can find the Secure Note button at the bottom of your posts

Thanks

Hello Bart,

You are using the incorrect set up. Please understand that the you have added the ACF field portfolio_blog_item to the portfolio item. You cannot use this meta field with the posts. Remember that you have assigned the field for the Portfolio Item:

The correct Looper Provider settings is to use custom. You can insert this:

{
  "name": '{{dc:acf:post_field field="portfolio_blog_item"}}'
}

Please REMOVE the meta values because we will just be using the custom JSON above.

Kindly let us know how it goes.

Hi,
Okay, I was using the wrong logic.

So I’ve used the custom part json as described above, but it still does not work.
How do I select the posts in the looper to match the portfolio_blog_item field on my current testimonial?

Thank you for the update.

We replaced the Looper Provider with Dynamic Content and set the value to the ACF field portfolio_blog_item . Please make sure to purge the cache before checking The Burning Question – How Do Humans Make Decisions? post, which has a selected relevant blog. We also adjusted the ACF field from Page Link to Post Object .

https://www.advancedcustomfields.com/resources/post-object/

Warm regards.

Okay excellent this works,

So to make sure that I get it:
The ‘Post Object’ field generates the input for the provider as an object, so that the provider itterates over the post objects, which the consumer can work on?

Yes, that’s correct. The Looper Provider (Dynamic Content) retrieves the Post Object field, which contains the post and makes it available to the consumer. It doesn’t work with the Post Link because this field only returns the post URL or an array of post URLs

Perfect, then I understand the concept.

Issue resolved for me.

Glad that we were able to help you.