H1 tag & Meta Title |
Post Reply |
Author | |||
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
Posted: 28-January-2011 at 2:32pm |
||
Is there any way to take the Meta Title of a category and have that display in an H1 tag in the body. I've tried to use the variables from the include-metatags file but nothing seems to work.
|
|||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
||
First you need to edit pcBreadCrumbs.asp:
Line 17 add categories.pcCats_MetaTitle like so...
Then, go to viewcategories.asp and edit line 343 to change categoryname to categorymetatitle:
Edited by Brett - 29-January-2011 at 9:46am |
|||
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
||
Worked perfectly! Your the man! If its not too much to ask maybe you can help me a tiny bit more. The reason I need this is to put a header tag at the top of the page that reflect the meta tag so we can focus on a long tail keyword and not have to change the category or product name. I figured out how to show the category name if the meta tag doesn't exist. Now I need to do the same for a product. The product meta tag title I cant figure out either.
Here is what I have so far.
Edited by whizzinpc - 01-February-2011 at 11:50am |
|||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
||
Hey, I can probably help. What is a long tail keyword? I guess you want to: Display the Meta Title on the top of the category and product details (and product configuration?) pages inside a <h1> tag. What you've pasted is the code you're now using for the category pages. Is that code sufficient or do you need it to do something else?
Are you now just looking for the same functionality on the product detail pages? Let's take it one step at a time and we can definitely get all of this working. *edit* to clarify: The category pages are fine now and you need the same functionality on the product detail pages? or... You need the same functionality on the product detail pages and you need something else done with the category pages? Edited by Brett - 01-February-2011 at 8:38pm |
|||
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
||
Basically I want to display the meta title for a category and product.
If you are on a category page then show the category meta title... if you are on a product page then show the product meta title. If the meta title for a category doesn't exist then show the category name. If the meta title for a product doesn't exist then show the product name. |
|||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
||
OK cool. And I assume the stuff for the category page is fine, right? You now just need the same functionality for the product page? Gonna start looking at that now.
|
|||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
||
viewPrd.asp
Line 296 database query add pcProd_MetaTitle:
Line 362 assign a variable to the database field:
viewPrdCode.asp Line 464 change pDescription to...
voila! |
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |