Jump to content

quotes and meta tags


minuteman

Recommended Posts

I built a script for placings variables into the meta tags. It's working but the content doesn't have any quotes around it. Yet if I echo the same value in a browser the quotes are there.

Here is the code

$re_meta_description = str_replace('$continent', $continent, $meta_description);

$re_meta_description = '"'.$re_meta_description
.'"';  (this is putting two quotes around the var by putting the quote within two apostrophes)

echo ' re_meta_description = ' , $re_meta_description;?><BR><?
(this echo in a browser writes the description with quotes at beginning and end)

<META NAME="revisit-after" CONTENT=<?echo $meta_revisit;?>>
<meta name="description" content=<?$re_meta_description;?>>
(these two produce the same results - no quotes)

Something is also taking the quotes in the metatags and showing them as apostrophes in the page source.

I doing all this believing spyders need the quotes to be able to read the tags but they do read the title without quotes. Is there anyway to see the page as a spyder would to see if it even matters? And I guess with most search engines not using metatags maybe I should just settle for the title working.


Link to comment
Share on other sites

dont do this as all bots will bot the metatag ok.

hard codded metatags are better if you want a good page ranking ok.


so if the metatag needs to be on all pages just make one page with the metatag information and use include("page.php"); to every page that needs the metatags ok.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.