# Template Page not working!

**URL:** https://discourse.roots.io/t/template-page-not-working/19068
**Category:** sage
**Tags:** sage10
**Created:** 2020-09-09T12:18:46Z
**Posts:** 11

## Post 1 by @T_Chord22 — 2020-09-09T12:18:47Z

Hello, I am very new to this Sage Template.

I created a new template and it does not seem to display in the frontend correctly:

 ![Annotation 2020-09-09 141819](https://discourse.roots.io/uploads/default/original/2X/2/244e3355c05fdabed5d40a57df36d49e21ba18a0.png)

Please help me out, I am going crazy

---

## Post 2 by @Bhanu_Kumar_Singh — 2020-09-09T12:32:35Z

What is it not displaying ??

If the content is not being displayed. You are missing the content tag.

```
@while(have_posts()) 
     @php the_post() @endphp
     @php the_content() @endphp <<<< You may be missing this.
  @endwhile
```

Also the page you want this template to be used, you will have to select it from the right panel.

Which in your case would be “Restaurant Template”.

---

## Post 3 by @T_Chord22 — 2020-09-09T12:36:30Z

No it has nothing to do with that, in the image above that is what I am seeing in the frontend of the site. All the code from the template in the backend, is displaying in the front.

I have also selected the template page to be Restaurant Template. Everything is fine, just that my code is showing in frontend

---

## Post 4 by @Bhanu_Kumar_Singh — 2020-09-09T12:44:38Z

You need to give more details for someone to suggest you.

What is the file name?  
Where is it created?  
How is it being called?

Do you see header footer on the same page?

---

## Post 5 by @T_Chord22 — 2020-09-09T12:48:05Z

I duplicated the file template-custom.blade.php to be template-restuarant.blade.php in the folder resources/views (where the rest of the template pages are sitting). Once I did that, I created a page in WordPress called Restaurant, which then I assigned my template “Restaurant Template” to that page. I then clicked up date.

And when I clicked to see if the page is displaying correctly (example: header or footer, etc).

I see only the code that was placed in the template-restaurant.blade.php. No header, no footer, etc. Just the template code

Here is the image below:

 ![image](https://discourse.roots.io/uploads/default/original/2X/5/5b4a145903bcad425b04681e1753eb08f064303b.png)

and here is the code:

```
{{--
  Template Name: Restaurant Template
--}}

@extends('layouts.app')

@section('content')
   @while(have_posts()) 
     @php the_post() @endphp
     @php the_content() @endphp
@endwhile
@endsection
```

---

## Post 6 by @Bhanu_Kumar_Singh — 2020-09-09T12:53:38Z

I don’t know if this would exactly be the cause of this but, have set your `resources/assets/config.json` correctly.

```
"publicPath": "/public-path/to-theme/without-slash",
  "devUrl": "http://example.test", << Your real site.
```

Are other templates working? For Example. 404, search ??

---

## Post 7 by @T_Chord22 — 2020-09-09T12:55:07Z

I will try out the above, but yes, all the other pages are working 100%

UPDATE: I did as you mentioned above, however I also have this code below that:

```
"proxyUrl": "http://localhost:3000",
	"cacheBusting": "[name]_[hash:8]",
	"watch": [
		"app/**/*.php",
		"config/**/*.php",
		"resources/views/**/*.php"
```

Not sure if that makes a difference, but I still get the same issue

---

## Post 8 by @Bhanu_Kumar_Singh — 2020-09-10T15:48:56Z

You can share your project, and I will look at it when I get free. I can’t commit the time.

---

## Post 9 by @alwaysblank — 2020-09-10T16:10:08Z

Do you get the same result when you assign the original `template-custom.blade.php` to a page? The issue you’re seeing is that Blade isn’t parsing that file for some reason–i.e. it’s just being included instead of interpreted. If your other pages work fine, then there’s something unique happening with that page. Is this a brand new theme? Do you have any plugins, custom post types, filters, etc set up?

---

## Post 10 by @T_Chord22 — 2020-09-11T06:40:44Z

Turns out I had it template-name-blade.php not template-name.blade.php

Such a noob, seems like a stupid mistake on my end.

---

## Post 11 by @system — 2020-10-21T12:18:48Z

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