# Sage 10: Where is head, body, app, etc?

**URL:** https://discourse.roots.io/t/sage-10-where-is-head-body-app-etc/20557
**Category:** sage
**Created:** 2021-04-08T08:29:46Z
**Posts:** 8

## Post 1 by @dangelion — 2021-04-08T08:29:46Z

Hi  
in Sage 10 where I have to put:

1. code for `<head>` (ie. meta for favicons or Google Analytics or other)
2. where I put classes on `<body>` tag
3. how to remove `<div id="app">` wrapping all? Or is it reccomended to keep it?

Thanks

---

## Post 2 by @hallowichig0 — 2021-04-08T13:27:40Z

You can find it inside of index.php

Check the screenshot below:

> **[Screenshot](https://prnt.sc/117dlrj)**
>
> Captured with Lightshot

---

## Post 3 by @dangelion — 2021-04-08T20:18:43Z

@hallowichig0 Thanks!  
Is a good practice modify that file?  
It seems like it’s not a good thing put `<meta>` and stuff directly in that file, to me, wrong?  
Is there maybe a better practice?

Also I need to use a Blade directives (`@asset` or `@svg` for include an svg sprite) and can’t work there

---

## Post 4 by @hallowichig0 — 2021-04-09T04:02:17Z

Yes you can modify that file. You can also use some WordPress hook like the wp\_head action to add some meta tag.

Example:  
In setup.php

```
add_action( 'wp_head', __NAMESPACE__. '\\your_action_hook' );
function your_action_hook() {

    echo '<meta charset="' . bloginfo( 'charset' ) . '">';

}
```

---

## Post 5 by @hallowichig0 — 2021-04-09T05:27:28Z

You can also try this one.

In index.php

```
<?php echo \Roots\view(\Roots\app('sage.view'), \Roots\app('sage.data'))->render(); ?>
```

In app.blade.php

```
<!doctype html>
<html {!! get_language_attributes() !!}>
  @include('partials.head')
  <body @bodyclass>
    @wpbodyopen
    @action('get_header')
    @include('partials.header')
      <main id="primary" class="main content-area main-wrapper">
        @yield('content')
      </main>
    @include('partials.footer')
    @action('get_footer')
    @wpfoot
  </body>
</html>
```

Take note: you need to install Sage Directive via componser  
See for the reference: [https://log1x.github.io/sage-directives-docs/usage/wordpress.html](https://log1x.github.io/sage-directives-docs/usage/wordpress.html)

---

## Post 6 by @dangelion — 2021-04-09T06:25:00Z

Thanks @hallowichig0  
this one could works without Sage Directive? Using standard WP function in place of directives

---

## Post 7 by @hallowichig0 — 2021-04-09T06:43:17Z

Yes, you can replace the sage directives with WP function like in the Sage 9

```
<!doctype html>
<html {!! get_language_attributes() !!}>
  @include('partials.head')
  <body @php body_class() @endphp>
    @php do_action('get_header') @endphp
    @include('partials.header')
    <main id="primary" class="main content-area main-wrapper">
      @yield('content')
    </main>
    @include('partials.footer')
    @php do_action('get_footer') @endphp
    @php wp_footer() @endphp
  </body>
</html>
```

---

## Post 8 by @system — 2021-05-20T08:29:49Z

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