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: