Problem with code

Hi
Can you please take a look at my code…something is wrong and my code for <title> has no effect

Is it the code for google verification that mess up this?
How should i fix it?

The problem is the same on every page i guess.

Best regards
Robert

Dear Robert,

Could you please share the Google verification code you inserted here? Also please tell me how did you insert it? Did you use a plugin or something else?

Regards,
Kharis

The verificatiob is put in a plu in suggested by a collegue of you and the plug in is called "Header and footer"
This is the code including verification on that page:

<!DOCTYPE html>
<html lang=“sv-SE” prefix=“og: http://ogp.me/ns#”>
<head>
<meta charset=“UTF-8”>
<meta name=“viewport” content=“width=device-width, initial-scale=1”>
<link rel=“profile” href=“http://gmpg.org/xfn/11”>
<link rel=“pingback” href=“http://www.steamwell.se/xmlrpc.php”>

<!-- [BEGIN] Scripts added via Head-and-Footer-Scripts-Inserter plugin by Arthur Gareginyan. -->
<meta name=“google-site-verification” content=“5EXLEiNx5Sad9hZYA7Sauj9nD3fsSsRRGSg3m3epptI” />
<html>
<head>
<meta name=“msvalidate.01” content=“1CE3865DE29CF5459C06E22BA2A2BFBA” />

&lt;/head&gt;
&lt;body&gt;
	
&lt;/body&gt;

</html>

<!-- [END] Scripts added via Head-and-Footer-Scripts-Inserter plugin by Arthur Gareginyan. -->

<title>Mötesbokning - Ta kontakt med en expert! Steamwell & Co</title>

<!-- This site is optimized with the Yoast SEO plugin v3.7.1 - https://yoast.com/wordpress/plugins/seo/ -->
<meta name=“description” content=“Mötesbokning hjälper vi dig med så fokuserar du på att sälja istället. Du slipper alla kalla samtal, dom tar vi hand om. Steamwell & Co bokar dina möten!”/>

Hello there,

That code seems like to indicate an example of complete HTML document which contains proper addition of Google verification code. If you are using Header and Footer plugin, you only need to insert this code:


<meta name="google-site-verification" content="5EXLEiNx5Sad9hZYA7Sauj9nD3fsSsRRGSg3m3epptI" />

From your dashboard, navigate to Settings > Header and Footer Scripts > paste the code above into the “Scripts in header:” box > Save Settings.

Regards,
Kharis

Regards,
Kharis

Thank you Kharis! That fixed the problem :slight_smile:
However…no i get message that my page lacks H1…but that is not true…so what is wrong?
Can you please look thrue the code and tell me what is wrong?
Pklease view code at:

Hello there,

Where did you get that notification from?

Actually, the h1 tags do exist on that page. One of them is:


<h1 class="title-post">Mötesbokning</h1>

You can check it by yourself by viewing the page source. On Firefox, right click on your page and select “View Page Source”.

Regards,
Kharis

It is a analyse tool that says i lack H1 but i also can see it so the tool is wrong?

I want to refrace this… I wrote wrong…
The analys says that i have 3 H1… and the site title is one of them.
…how can i change that to H2?

Hello there,

You should overwrite these main theme’s files:

  • content-page.php
  • content-single.php

from a child theme. Copy those two files into the child theme’s folder. Then replace this line:


<?php the_title( '<h2 class="title-post">', '</h2>' ); ?>

with:


<?php the_title( '<h2 class="title-post">', '</h2>' ); ?>

Regards,
Kharis

ok…so i tried that… it had no effect… i still have H1 as you see:
<h1 class=“site-title”>Steamwell & Co</h1>

Please advice

Regards
Robert

Dear Robert,

I visited http://www.steamwell.se/motesbokning/, the page title that says “Mötesbokning frigöra värdefull säljtid åt dig.” is wrapped with H3 tag now. The code I suggested wasn’t intended to change the site title tag. If you want to change it, you should edit the header.php in child theme mode. Replace this line:


<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

with:


<h3 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h3>

Regards,
Kharis

Hi Kharis
If i go in to the folder named Sydne pro child i cant find header.php?

Dear Robert,

That is considered as normal; no header.php file in the child theme by default. You should manually copy that file from main theme’s folder.

Regards,
Kharis