Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
Renaming The Title Of Individual Pages
#1
Posted 06 February 2009 - 08:23 AM
I've recently started an seo job on a company website that uses php, and I'm not big on it at all.
At the moment individual pages pull from a template page elsewhere on the site, within the title tag on the template page is <?php echo $title; ?>
Every page on the site at the moment has Welcome 'page name' as the title but I would like to customize each individual page and I have no clue of how to go about it? It's also the same with the meta desciption, and the keyword tags!!
Wes
#2
Posted 06 February 2009 - 08:55 AM
Can you grab the code that sets the title in this included page and paste it here? There are several ways they could be doing this, but it should be fairly easy to tweak once we know what they're doing. But still make sure there's always something there.
#3
Posted 06 February 2009 - 11:13 AM
I'm not sure what you actually need to determine how this goes.
I've PM'd you the url of the site if that helps!
Wes
#4
Posted 12 February 2009 - 12:24 PM
If you make sure you have good back ups and play around with this for a while you will find out where everything is within the site, and understand the structure much better then if you follwo instructions like "do a, now do b". Have a play around in the code and you will increase the amount you are able to do on this site.
Alternatively, give the client a word doc with your recommendations and instructions on how you would like their developer to implement them.
#5
Posted 12 February 2009 - 12:30 PM
I've still not been able to sort this out, I've posted on seomoz and awaiting a reply. Have you any ideas what I can do maybe?
Thanks,
Wes
Depends it could be a global variable set some where or is there some php code that accessing a database to pull a $title back from a database.
#6
Posted 12 February 2009 - 01:01 PM
I also seem to recall you'd found a mainapp.php file, or something close to this filename, that pulled certain information from a database to populate different parts of the pages. eg the page Title, meta keywords, meta description, etc. I believe in that file somewhere it also made reference to a $pageTitle variable that accessed a "pagename" (as in filename) of the page being loaded.
Can you see the database to see those different fields?
If it were me I'd edit one or two of those fields for a single page, then load it in my browser to see what it does. You should be able to see what each edit changes in the page code. For instance, if those pages weren't going to have a long meta description you might be able to re-purpose that database field so that it also became the page <title>. Then change the reference in that mainapp.php file so that the title is getting pulled from the field you want it to be pulling from.
Since it's already pulling from the database that'll be the easiest way to do it if you can. Though it would require someone going through the database for each of the pages to make edits.
#7
Posted 16 February 2009 - 10:26 AM
I also seem to recall you'd found a mainapp.php file, or something close to this filename, that pulled certain information from a database to populate different parts of the pages. eg the page Title, meta keywords, meta description, etc. I believe in that file somewhere it also made reference to a $pageTitle variable that accessed a "pagename" (as in filename) of the page being loaded.
Can you see the database to see those different fields?
If it were me I'd edit one or two of those fields for a single page, then load it in my browser to see what it does. You should be able to see what each edit changes in the page code. For instance, if those pages weren't going to have a long meta description you might be able to re-purpose that database field so that it also became the page <title>. Then change the reference in that mainapp.php file so that the title is getting pulled from the field you want it to be pulling from.
Since it's already pulling from the database that'll be the easiest way to do it if you can. Though it would require someone going through the database for each of the pages to make edits.
Hi Randy,
Thanks for your help on this one ;-)
I've actually managed to figure it out, go figure! Like you said, it needed the editing of each individual file to include the variables $title = $keyword = etc to overwrite the data pulled from the database.
I'm officially a PHP ninja! Yea rite...Don't think I'll ever be one!
Cheers Randy!
Wes
#8
Posted 16 February 2009 - 12:12 PM
So you can safely call yourself a PHP Ninja for page titles with the CMS you're working with. And that's all that really matters right now, isn't it?
#9
Posted 10 March 2009 - 07:14 AM
So you can safely call yourself a PHP Ninja for page titles with the CMS you're working with. And that's all that really matters right now, isn't it?
I'm sure it is lol! And beleive me I use it very relatively :-)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









