Filter posts with custom template

Hi
Is there a way to filter a way to filter posts if they have a custom template ? how ?
Thanks

Hey @GregFdz ,
If you want to display a custom set of posts and custom post types (CPTs) in a Posts or Search module, you can create a filter to override query args in the FLBuilderLoop class.

Hey

Thanks for your reply but I’m not sure that I understood it, to be honnest. And because of that I’m not sure that you understood exactly what I meant.

Is your solution something that can be made trough templates and handlebars ? Will it allow me to filter posts that use a custom template as allowed by ghost in the editor’s side pannel ?

To be sure that we are talking about the same thing, I want to be able to filter posts that use different of the layouts offered by my theme (like “No cover image”, “Full cover image” or “Video publication”).

Thanks for your help

This should get you what you need :
{{#get "posts" filter="custom_template: - null" }}
You can add more attributes to ‘get’ such as limit number of posts as needed)

1 Like

Thanks ! It works. Now I’ll also be able to make unreferenced posts :+1: