PDA

View Full Version : How to edit meta tags



suntech
05-10-2011, 02:31 AM
I cant seem to find a way to edit meta tags. Anyone know?
Thanks,
Tim

ridexbuilder
05-10-2011, 04:03 AM
Tricky one to fathom out! :p
catalog/includes/meta_tags.php

Read it carefully - I've seen a few messy ones.

suntech
05-10-2011, 09:24 AM
Yeah I was looking at the yesterday. Pretty intricate but I will give it a whirl.
Thanx Ridex, you are always a big help.

One last thing and I think Im done... looking for a way to make it so the to category link doesnt do anything except reveal the subcategoies below it. I dont like when it goes to a page with the subcategories as well as opening the tree.

This is what I would like:

Baseball
Football
Helmets
Balls
Jerseys
Soccer
Tennis

But nothing changes in the center of the page till a subcategory is selected.

ridexbuilder
05-10-2011, 09:32 AM
A different question merits a different thread. ;)
Try: SEO Pop Out Menu

ptrau
07-30-2011, 06:19 AM
I am using 2.5 RC1. Is this where I add the extra keywords to meta.php?


// Get site wide keyword from the languages table and insert into meta keywords string
$mt_extra_query = tep_db_query("select meta_keywords from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'");
$keywords = tep_db_fetch_array($mt_extra_query);
$mt_extra_keywords = $keywords['meta_keywords'];
// Check for trailing ,
if (substr($mt_extra_keywords, -1) == ',') {
$mt_extra_keywords = trim($mt_extra_keywords, ',');
}

I am using SEO popout menu.

Thanks

michael_s
07-30-2011, 08:14 AM
See the wiki:
http://wiki.oscdox.com/custom_meta_tags?s[]=meta&s[]=tags

ptrau
08-05-2011, 08:26 AM
Did that first....you may notice that the Wiki is no longer correct for ver2.5 RC1......catalog/includes/meta_tag.php very different file and code.

New Code:

// Get site wide keyword from the languages table and insert into meta keywords string
$mt_extra_query = tep_db_query("select meta_keywords from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'");
$keywords = tep_db_fetch_array($mt_extra_query);
$mt_extra_keywords = $keywords[''];
// Check for trailing ,
if (substr($mt_extra_keywords, -1) == ',') {


So now what?

pgmarshall
08-05-2011, 11:36 AM
Go to Admin -> Localization -> Languages -> Select the language -> Click Edit -> Add META keywords seperated by a comma. (Note these will appear on EVERY page.)

Ps. I will try and update the wiki if I get a minute ...

Regards,

pgmarshall
08-05-2011, 11:36 AM
Wiki updated: http://wiki.oscdox.com/v2.5/meta_tags

Regards,

ptrau
08-06-2011, 10:03 AM
Re your suggestion....did this and it did not change the meta keywords on my pages....see attachment



Go to Admin -> Localization -> Languages -> Select the language -> Click Edit -> Add META keywords seperated by a comma. (Note these will appear on EVERY page.)

View meta keywords via page source at FlooringSteals.com : (http://www.flooringsteals.com)

Viewed updated wiki and it is very helpful for specific keyword to pages...thank you. But need to get "sitewide" keywords added.

any thoughts?

pgmarshall
08-06-2011, 12:02 PM
It works on my test store (with a few words) ... Can you try fewer words and see if it works ... it may be the database field need extending to take more characters.

Regards,

michael_s
08-06-2011, 01:01 PM
Or maybe you have the page cache on? Clear the page cache and your browser cache.

ptrau
08-07-2011, 05:51 AM
Edited database table languages like this: meta_keywords varchar(1000) utf8_general_ci Yes NULL
Reloaded meta_tags.php file to server and now it works. I must have made a small change when trying to edit the file directly.

Now it adds the extra keywords to the meta name description. So now I am off on a quest to see how to edit that site wide.

Thanks for the help

ridexbuilder
08-07-2011, 08:55 AM
varchar(1000)Somewhat excessive don'tcha think?! :eek: You likely get penalised for too many keywords, so 256 chars should be more than enough. (Personally, I'd reckon 128, to be verbose enough.)

ptrau
08-07-2011, 08:59 AM
True, it may be excessive, but it is competitive. After researching our biggest and most successful competitors online, we have determined the number that we need. We don't come anywhere near using 1000 chars but 300-400 is common. But the number one search engine in the world excludes keywords from their organic search algorithms anyway. I will adjust the varchar number down to a more realistic number when we have landed on the final count.