Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Replacing Title for Homepage

Solved by Jared View solution

Started by Ryan W 9 years ago · 2 replies · 1119 views
9 years ago

I'm trying to replace the main "Home" with a customized phrase without changing the title of the page. Is it possible to do that? I'm not sure where to customize that.

My site is using the 'Clean Blog' theme.

http://www.accrualbowtie.com/

Thanks!

last edited 05/01/18 by Ryan W
9 years ago Solution

Hi
There are a couple of ways to do this but I assuming the home page title isn't going to be changed once set so this is what I would do.

in header.html.twig ->
line 14

Change:

<h1>{{ page.title }}</h1>

to:

{% if page.home %}
<h1>Your homepage title here</h1>
{% else %}
<h1>{{ page.title }}</h1>
{% endif %}

Hopefully that'll do the trick.

👍 1
9 years ago

You are a gentleman and a scholar! :tophat:

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by themetman, 6 days ago
1 103 3 days ago
Themes & Styling · by AH, 3 weeks ago
1 223 3 days ago
Themes & Styling · by Bruno, 4 years ago
6 1386 3 days ago
Themes & Styling · by TomW, 3 weeks ago
2 227 5 days ago
Themes & Styling · by FrViPofm, 2 months ago
4 687 2 months ago