Jump to content
Larry Ullman's Book Forums

Change Page Title On Sort? [Script 8.6: A Registration Script]

Recommended Posts

Hi Larry,

Google Webmaster tools is flagging this script for making duplicate page titles.  Can you please tell me how best to append/echo the sort order to the page Title in the HTML (switch $link1, $link2, $link3 - lnd, lna, fnd, fna, drd, dra)?



Link to comment
Share on other sites

OK - I got something working (not ideal). Made a new variable:


    $pageTitle = "$_SERVER[REQUEST_URI]";


and then in the title tags


<title>Example <?php echo $pageTitle ; ?></title>


Depending on the sort order, would like to change $pageTitle to echo different text, for example "A-Z" or "Z-A" (instead of /example.php?sort=lnd), but at least this prints unique page titles.

Link to comment
Share on other sites

Hi Larry,

I agree - the sort order shouldn't constitute duplicate pages as there really is no new content being generated, just the same stuff rearranged. However for some reason, Google thinks differently. Maybe because the URL changes slightly, that's all it takes. They can't be sure if it's a new page or not, so they just go with new page?



Edited by bobafifi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...