0

I had previously created an html site for our company with meta keywords and descriptions and although the site wasn't amazing it had good ranking and people contacted us. We had the website redone in php last year and since then the ranking has gone down dramatically. Google referenced the same description (coming from header.php) for all the pages. The designer basically won't change anything as he is no longer freelance and basically cannot be asked to maintain the site. I tried to add keywords and descriptions by adding on the pages the following

$meta['keywords'] = "Keyoword, more words, ...";
$meta['description'] = "...";
<?php include('header.php'); ?>
my text
<?php include('footer.php'); ?>

then in header.php I added

<meta name="keywords" content="<?php echo $meta['keywords']; ?>" />
<meta name="description" content="<?php echo $mtea['description']; ?>"     />

This seems to work but now upon loading the page I see for a split second the text/code behind it and I am not sure why that is. Any insight would be welcome thanks!

hatef
  • 5,491
  • 30
  • 43
  • 46
FSMarb
  • 1
  • Not sure I understand what you need. Can you clarify a bit more? And also, I visited your page, nothing was strange to me. – JureW Jul 18 '19 at 10:57
  • We have a site that uses one file for header and then different files for the various pages (only 5 of them). In order to add meta description I have used the following code in the header – FSMarb Jul 19 '19 at 07:36
  • @JureW Our site uses a php file for the header then different php files for the each of the 5 pages. To add meta description I have replaced this code in the header with then in php for the services page I have added at the beginning of the code but it causes FOUC and also a bigger white space on the menu for the pages I changed. I can work with html but am not familiar with php hence my issue. Thanks for any insight/help! – FSMarb Jul 19 '19 at 07:48

1 Answers1

0

Seems like FOUC to me. See Browser displays page without styles for a short moment (visual glitch)

I see problems in generated homepage: Mentioned <meta>'s are empty, but at line 88 is "$meta['keywords'] = "home automation, domotica, ..." leaked into <header> element.

VVend
  • 163
  • 1
  • 9
  • Thanks! I am away from my desk but will look at what you commented later today and hopefully fix this – FSMarb Jul 18 '19 at 12:43
  • I am sorry. I have just this observation. I can't tell more because I have no idea what the structure of your web code is. It seems to me that it may be much more complex than your question suggests. – VVend Jul 19 '19 at 07:30