0

I have created custom theme for wordpress - nothing complicated, just starting page, no footer, sidebar, menu. But here I have problem which I can't solve. I want to use font "Lato" from google fonts with latin extendend fonts (polish signs). As I provided proper codes in header (I think), in css, but still the result is like that: http://artystycznaperspektywa.com/

Here is header.php

<!DOCTYPE HTML>
<html <?php language_attributes(); ?>>
<head> 
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width">
 <title><?php wp_title( '|', true, 'right' ); ?></title>
 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
        
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
    <link href="https://fonts.googleapis.com/css?family=Lato&amp;subset=latin-ext" rel="stylesheet">

</head>

Here is index.php:

<?php get_header(); ?>

<body>
<div class="container">
        
        <div id='logo'><img src="<?php bloginfo( 'template_url' ); ?>/img/logo.png" ></div>
        
        <div id="intro">Dziękujemy za odwiedzenie strony Artystycznej Perspektywy. Zapraszamy do zapoznania się z naszą ofertą:</div>
        
        <div id="select">

            <div id="malarstwo">
                <div class="sign1">
                    <div class="name1">
                        <a href="http://artystycznaperspektywa.com/malarstwo/"><img src="<?php bloginfo( 'template_url' ); ?>/img/malarstwo.jpg" ></a>

                        <a class="link" href="http://artystycznaperspektywa.com/malarstwo/">Malarstwo ścienne</a>
                    </div>
                </div> 
            </div>

            <div id="fotografia">
                <div class="sign2">
                    <div class="name2">
                        <a href="http://artystycznaperspektywa.com/fotografia/"><img src="<?php bloginfo( 'template_url' ); ?>/img/fotografia.jpg" ></a>

                        <a class="link" href="http://artystycznaperspektywa.com/fotografia/">Fotografia</a>
                    </div>
                </div>
            </div>
        </div>

    </div>

    </body>
</html>

And of course in css font is put in html, body.

Does someone see what can couse problems with fonts? This problem does not appear in other sites (which are made on ready theme), only on this custom theme.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Lukasz
  • 1

1 Answers1

0

Please check if selected encoding of the file index.php in your code editor is UTF-8, probably it's not, and because the charset of the page is set to UTF-8 <meta charset="UTF-8" /> this causes the problems to appear.

Picard
  • 3,745
  • 3
  • 41
  • 50
  • Unfortunatelly, that's not it. I tried changing setting it in Notepad++ and my IDE NetBeans (by adding "-J-Dfile.encoding=UTF-8" in netbeans.conf file), but the result is the same. – Lukasz Nov 26 '18 at 18:32
  • I don't know what operating system are you using but I would try opening the file in a text editor that shows you current file encoding an allows you to change it, under Windows a good choice could be Notepad++. Then make sure that in Menu->Encoding you see UTF-8 and in the same moment that all the characters in your text look OK. Having you template file setup and checked this way, now try to use it in you theme to see what happens. – Picard Nov 27 '18 at 07:58