Overriding Plugin Templates using Blade files - Search & Filter Pro

Hi there,

Apologies if this topic is redundant, but I couldn’t find exactly what I was looking for in past threads.

I would like to use a plugin called Search and Filter Pro. They have a shortcode that can be added to a page that displays the results of their search and filter functionality. They allow the results template to be overwritten by placing /search-filter/results.php in the theme folder. I would like to use blade templates for the output of the results, but I’m not sure how to have blade files in the search-filter folder be correctly interpreted by blade.

I’ve added results.php to the folder within my theme’s /resources folder and that works fine. But changing it to results.blade.php doesn’t work. To make matters more complicated (maybe) I’d also like to include a template partial within results.blade.php (like @include(‘partials.list-item-bio’)) which will live in the /views/partials directory.

Has anyone used Search and Filter Pro with Sage 9 before? I’m sort of feeling like this setup is too complicated the integrate with blade templates, but I thought I’d ask the community!

Thanks for your help.

I’m not familiar with Search and Filter Pro, but you might look at how this repo solves a similar problem with WooCommerce: https://github.com/roots/sage-woocommerce

Alright I’ll dig into that to see if there’s anything that can be replicated with this particular plugin.

Thanks for the response!

Great question, using the exact same plugin too and need to update things to work with .blade.php too.

Please do keep us updated if you figure it out at all, I’ll do the same.

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