Supportlogo-header

02:03AM, Nov 02, 2007

Krissy Member

META TAGS

Hi

Just trying to create search engine optimisation for my soon to be launched web site. Is there any way to create separate key word and description meta tags for each web page?

Thanks
Krissy

Krissy

06:50PM, Nov 06, 2007

daniel jaded Pixel

It should be possible to wrap conditions around your meta tags so certain meta tags show up on certain pages only:

{% if collection %}
  {% if collection.handle == "testcollection" %}
    <meta name="description" content="This is my testcollection">
  {% endif %}
  ....

{% endif %}

or

{% if collection %}
  <meta name="keywords" content="{% for tag in collection.tags %}{{ tag }} {% endfor %}">
{% endif %}
daniel

08:24AM, Dec 27, 2007

Adam Member

So.. for example, if it was on a product page and you wanted to have the meta description tag read:

My store presents product name blah blah blah. (Where product name is dynamic.) What would the collection.handle be? What would the product name variable be?

03:10PM, Jan 03, 2008

FannyA Member
{% if collection %}
  <meta name="keywords" content="{% for tag in collection.tags %}{{ tag }} {% endfor %}">
{% endif %}

Daniel, i understand where you put your keywords in ur code. But where do you put your collection handle in the code above?

Is it here?

for tag in COLLECTION-HANDLE.tags

Thank you

Where exactly to you insert it in theme.liquid?

Cheers

12:33PM, May 07, 2008

Christina Miss Manners

meta tag explanation

operation absurdist feature requests: terminated (http://en.wikipedia.org/wiki/Absurdism)

login or Sign up for an account to reply.