# Plugin Template not being overwritten in Sage 9

**URL:** https://discourse.roots.io/t/plugin-template-not-being-overwritten-in-sage-9/12455
**Category:** sage
**Created:** 2018-05-13T18:49:45Z
**Posts:** 6
**Showing post:** 2 of 6

## Post 2 by @mmirus — 2018-05-14T22:02:52Z

Hey @s3w47m88 - out of the box, the file `resources/wp-hotel-booking/single-room.php` should override the plugin template.

To get it more neatly integrated into the Sage file organization and Blade, add this to `app/filters.php`:

```
add_filter('template_include', function ($template) {
    if (is_single() && get_post_type() == 'hb_room') {
        $blade_template = locate_template('single-room.blade.php');

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

    return $template;
}, 100);
```

And put your custom template in `resources/views/single-room.blade.php`.

You can modify that filter as needed if you want to use a different folder or change anything else.

Same approach should work for the plugin’s other templates if you want to override more.

---

_[View the full topic](https://discourse.roots.io/t/plugin-template-not-being-overwritten-in-sage-9/12455)._
