Beta 7: Still trying to figure out Looper with Custom Post Types

Hi @alexander and others,

I’m working on a client site that uses a Custom Post Type (“Samples”) and I just can’t seem to get the Looper figured out, either pulling up other posts at the bottom of a Single template page, or with an attempt at an Archive page.

For the Single posts page, scroll down to the “MORE SAMPLES” area. I’ve tried two different ways of doing it, the first one with the Row set up as a Looper Provider, and the columns set up as Consumers, and then I tried using your Posts element. In both cases, I get is the regular Posts (I added some dummy posts just to see how they would all show up), not the Custom Post Type posts.

I am wondering if I’ve made a mistake in the way I’ve set up the Custom Post Type (I used the CPT UI plugin).

I’ll send links and login info in a secure note. Thanks for your help!

Thanks for reaching out about this. We’re still thinking through better ways to possibly make this more apparent/obvious, but the biggest thing to consider is that you should not turn on a Looper Provider in the archive mode unless you intentionally want to run a separate query. If you’re using on of the included Posts elements you can just turn the Looper Provider off.

A great way to quickly get started with the Archive mode of the Layout Builder is clicking “Use Template” when you first open a new layout (or just delete all your sections to see it again). Any of those examples will be setup to work straight away.

Hopefully that helps!

Hi @alexander, thanks for your reply!

I turned off the Looper Provider on the Archive template page, and sure enough, it used the “Samples” Custom Post type (hooray!), but you didn’t say anything about how to deal with the “More Samples” area at the bottom of the Single page template. Could you have another look?

Thanks!

Hey, I’m sorry about that. I was checking into it and I think that was a bug in how custom post types were referenced. It was like that setting wasn’t getting applied. I’ve installed a development build on your site where that issue is corrected.