Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Custom meta tags for your store

  • The file you edit is: /catalog/includes/meta_tags.php
  • In v2.5 the addition of site wide meta tags has been made much easier since you can now add these through the admin panel rather than editing the actual code.

Adding site wide meta tags

  • Open your admin panel
  • Goto Localization
  • Click on Languages
  • Click Edit for each of the languages you have live in your store
  • Add your meta tags in the field provided.

Custom Text on individual pages

  • If you want to add different text strings to different pages in your store then you will still need to edit the meta_tags.php file.

Adding meta tag descriptions to a specific page

  • To add customization to single pages, scroll down the meta_tags.php file and edit the individual page settings. For example if you want to add word ONLY to the index page:
case CONTENT_INDEX_DEFAULT:
define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', 'custom text here ' . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . HEADING_TITLE);
break;
  • If you replace the 'custom text here ' from the above example with your own custom text, it will display that custom text on the index_default page only.

Adding custom text to other meta tags

  • Simply add the custom text in whichever case you want to add to. You can place the custom text in any of the defined variables like this:
case CONTENT_INDEX_DEFAULT:
define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', 'custom text here ' . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . 'custom text here too' . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', 'custom,keywords,here' . WEB_SITE_KEYWORDS . HEADING_TITLE);
break;

Removing dynamically generated meta tags

  • If you want to remove any of the dynamic items, simply remove the variable that corresponds to the dynamic meta info that you want removed from the tag. For instance, to remove the dynamically generated meta description from the index.php page:
case CONTENT_INDEX_DEFAULT:
define('META_TAG_TITLE', TITLE . PRIMARY_SECTION . HEADING_TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', 'custom text here ' . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . 'custom text here too' . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', 'custom,keywords,here' . WEB_SITE_KEYWORDS . HEADING_TITLE);
break;
  • Removing the code . TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION and . WEB_SITE_KEYWORDS from the above example will remove all dynamic meta content from the META_TAG_DESCRIPTION.
  • This corresponds to the meta_description HTML tag and it would now just contain your custom content, and not any dynamically generated content.
  • Bookmark at
  • Bookmark "Custom meta tags for your store" at Reddit
  • Bookmark "Custom meta tags for your store" at Google
  • Bookmark "Custom meta tags for your store" at Facebook
  • Bookmark "Custom meta tags for your store" at Twitter
  • Bookmark "Custom meta tags for your store" at Slashdot
v2.5/meta_tags.txt ยท Last modified: 2011/08/06 01:32 by pgmarshall
You are here: startv2.5meta_tags
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0