Hello,
i want to try a individual font. I know how to use google fonts now (https://kriesi.at/support/topic/google-titillium-webfont-einbinden/) but i find no clue, were to put the code, which myfont gave me:
<script type="text/javascript">
(function() {
var path = '//easy.myfonts.net/v2/js?sid=285408(font-family=Ciutadella+Slab+Medium)&sid=285409(font-family=Ciutadella+Slab+Semi+Bold)&sid=285410(font-family=Ciutadella+Slab+Regular)&sid=285412(font-family=Ciutadella+Slab+Light)&key=7XaQYsXgYw',
protocol = ('https:' == document.location.protocol ? 'https:' : 'http:'),
trial = document.createElement('script');
trial.type = 'text/javascript';
trial.async = true;
trial.src = protocol + path;
var head = document.getElementsByTagName("head")[0];
head.appendChild(trial);
})();
</script>
Can you help me please.
Kind regard,
Daniela
Hi Daniela!
Please copy and add the below code in functions.php
function add_custom_code(){
?>
<script type="text/javascript">
(function() {
var path = '//easy.myfonts.net/v2/js?sid=285408(font-family=Ciutadella+Slab+Medium)&sid=285409(font-family=Ciutadella+Slab+Semi+Bold)&sid=285410(font-family=Ciutadella+Slab+Regular)&sid=285412(font-family=Ciutadella+Slab+Light)&key=7XaQYsXgYw',
protocol = ('https:' == document.location.protocol ? 'https:' : 'http:'),
trial = document.createElement('script');
trial.type = 'text/javascript';
trial.async = true;
trial.src = protocol + path;
var head = document.getElementsByTagName("head")[0];
head.appendChild(trial);
})();
</script>
<?php
}
add_action('wp_head', 'add_custom_code');
Cheers!
Vinay
That works. Thank´s a lot!!!
Cheers, Daniela