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!