Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Replacing Title for Homepage

Solved by Jared View solution

Started by Ryan W 8 years ago · 2 replies · 977 views
8 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
8 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
8 years ago

You are a gentleman and a scholar! :tophat:

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 2 weeks ago
4 395 5 days ago
Themes & Styling · by johan thomas, 5 years ago
1 752 2 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 609 2 months ago
Themes & Styling · by Sebadamus, 2 months ago
5 622 2 months ago
Themes & Styling · by martynfoster735, 2 months ago
1 595 2 months ago