Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
bobafifi

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)?

 

Thanks!

Share this post


Link to post
Share on other sites

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

 

<?php
    $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.

Share this post


Link to post
Share on other sites

Glad you got it working! I'm not positive that different sorts should be treated as different pages but it's cool you found a solution regardless!

Share this post


Link to post
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?

 

-Bob

Edited by bobafifi

Share this post


Link to post
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.

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

Loading...
Sign in to follow this  

×
×
  • Create New...