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.

General

Agency skeleton: How to change site title to custom logo

solved theme

Started by Peter Simkovic 7 years ago · 8 replies · 2372 views
7 years ago

Hi guys, I am doing some customisations to this great theme and I would like to change site title shown on left at navigation bar to my logo (PNG). Any hint would be welcomed... 😊

7 years ago

Hi @paulhibbitts thank you for you reply but I am not sure if I got what you mean. 🙄

7 years ago

No problem @WhiteWolfSix🙂 What you need to do is edit the file site.yaml in your Grav site folder /user/config/ and change the field title: from Grav to the name that you want for the site - is that any clearer?

https://learn.getgrav.org/16/basics/grav-configuration#site-configuration

BTW, I changed the highlighted line above to indicate which line to edit, at first I thought it was the second title field...

7 years ago

@paulhibbitts I don't need to change name of the site. I need to replace displaying the name of the site by my logo in PNG format.

7 years ago

Well, that was what I thought. Anyway, thanks for your replies.

👍 1
7 years ago

You have to change your navigation.html.twig template in usr/themes/agency/templates/partials
Edit:

TWIG
<a class="navbar-brand page-scroll" href="#page-top">{{site.title}}</a>

to

TWIG
<img src='{{ theme_url }}/images/logo.jpg' style='display: block' alt='{{ site.title }}' />

and put your logo in usr/themes/agency/images

But it's better you use theme inheritence. Just read the documentation link by paulhibbits above.

👍 1
7 years ago

Thank you @arank for your advice, it helps me to solve my problem.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 10 hours ago
General · by pamtbaau, 15 hours ago
1 51 15 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago