Using blade for Search and Filter pro plugin templates

Hi.
I usually don’t post anything since I almost always find what I’m looking for here but, I have a question/issue also described in this topic Overriding Plugin Templates using Blade files - Search & Filter Pro. This topic has been closed.

I’m using the Search & Filter Pro plugin in my project and I’d like to overwrite a plugin template file. I can modify the file if I place the file inside my theme resources folder like resources/search-filter/results.php. I want to use blade for this file but I can’t get it to work.

I’v tried changing the file to .blade.php and also tried to put the folder inside the
resources/views folder.
I also tried adding this code to my filters

add_filter(template_include, function ($template) {
    if (is_single() && get_post_type() == producten) {
        // I tried with and without views
        $blade_template = locate_template('views/results.blade.php');

        return ($blade_template) ? $blade_template : $template;
    }

    return $template;
}, 100);

Nothing seems to work and i tried a couple of different combinations and folders.
I would really appreciate any help.

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