Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Replacing Title for Homepage

Solved by Jared View solution

Started by Ryan W 8 years ago · 2 replies · 696 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 Slebeig, 3 weeks ago
4 221 3 weeks ago
Themes & Styling · by Pedro M, 3 months ago
4 491 2 months ago
Themes & Styling · by Ian, 3 months ago
3 263 3 months ago
Themes & Styling · by Norbert, 2 years ago
11 647 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 202 3 months ago