Sage 10 Custom Post Types on archive-{post-type}.blade.php

I’m stuggling to try and display a list of posts from a custom post type in sage 10. I understand how to do it with Sage 9 controllers, but I can’t seem to get it working in Sage 10 Composers. I can display a single-{post-type}.blade.php file without any setup, but I have nothing for a list of custom post types. Also, I tried installing the original sage 9 controllers plugin but it didn’t work. Does anyone have advice on how to get this working?

The routing system for templates has always followed the WordPress template hierarchy: https://wphierarchy.com/ All that changes is you use a .blade.php extension instead of .php. If you want an archive of custom post types, you’d use archive-[posttype].blade.php.

Also I don’t believe the Controller package is compatible with Sage 10.

Well, that’s unfortunate because now I have no idea why my list of custom post types isn’t displaying. I can’t get the template to load at all. Is there something I’m missing in the admin panel?

Can you show us your code?

This topic was automatically closed after 42 days. New replies are no longer allowed.