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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Replacing Title for Homepage

Solved by Jared View solution

Started by Ryan W 8 years ago · 2 replies · 618 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 Pedro M, 2 months ago
4 192 2 months ago
Themes & Styling · by Ian, 2 months ago
3 89 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 447 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 42 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 122 3 months ago