2016-12-10, 03:00 PM
Want to replace the logo with a text written in html and a custom font using google fonts? Read below how.
Step 1: Switch logo with html text - Open "templates"-> "Header templates" -> "header".
Find
Replace with
Step 2: Add a cool google font
1. Choose a font here: https://fonts.google.com
1.1. As example we take Bungee: https://fonts.google.com/specimen/Bungee
2. At the top right you "Select this font". Click on it.
[attachment=37993]
2.1. A window pops up
[attachment=37994]
2.2 Copy the embed code (api). On this font:
And paste it to the bottom of the "header" template.
2.3 Below the embed code, you see the css style code. Add it with a <div style to the logo text.
So in "header template"
Find
Right after it, add:
And after the text logo html stuff we added from Step 1, close the div with:
Complete code:
Preview:
Step 1: Switch logo with html text - Open "templates"-> "Header templates" -> "header".
Find
<a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
Replace with
<a href="{$mybb->settings['bburl']}/index.php" style="text-decoration: none"><span style="color:#optinalcolorcode; font-size: 24pt;">My Forum</span></a>
Step 2: Add a cool google font
1. Choose a font here: https://fonts.google.com
1.1. As example we take Bungee: https://fonts.google.com/specimen/Bungee
2. At the top right you "Select this font". Click on it.
[attachment=37993]
2.1. A window pops up
[attachment=37994]
2.2 Copy the embed code (api). On this font:
<link href="https://fonts.googleapis.com/css?family=Bungee" rel="stylesheet">
And paste it to the bottom of the "header" template.
2.3 Below the embed code, you see the css style code. Add it with a <div style to the logo text.
So in "header template"
Find
<div class="wrapper">
Right after it, add:
<div style="font-family: 'Bungee', cursive;">
And after the text logo html stuff we added from Step 1, close the div with:
</div>
Complete code:
<div style="font-family: 'Bungee', cursive;">
<a href="{$mybb->settings['bburl']}/index.php" style="text-decoration: none"><span style="color:#optinalcolorcode; font-size: 24pt;">My Forum</span></a></div>
<link href="https://fonts.googleapis.com/css?family=Bungee" rel="stylesheet">
Preview: