Solved

Editing the collections/all page

ABCbtqmedequip
Excursionist
31 0 2

Hello!

I'm looking to change the title and add a meta description for my collections/all page. Any advice? (currently using the minimal theme)

Thanks!

Accepted Solution (1)
oscprofessional
Shopify Partner
15830 2369 3072

This is an accepted solution.

Hi,

Thought this might be helpful for some of you. If you don't have an SEO plugin that handles it you can edit your theme.liquid file and add something like this:

  {% comment %} Handle certain pages manually which aren't available in the backend such as all products {% endcomment %}
  {%- if collection.title == 'Products' -%}
  {% assign seo_title = "INSERT PAGE TITLE HERE" %}
  {% assign page_description = "INSERT PAGE DESCRIPTION HERE" %}
  {%- endif -%}

I added it right before the opening title tag so it would set those variables before the theme file requested them:

  {% comment %} Handle certain pages manually which aren't available in the backend such as all products {% endcomment %}
  {%- if collection.title == 'Products' -%}
  {% assign seo_title = "INSERT PAGE TITLE HERE" %}
  {% assign page_description = "INSERT PAGE DESCRIPTION HERE" %}
  {%- endif -%}
  <title>{{ seo_title | strip collection.title }}</title>
  {%- if page_description -%}
    <meta name="description" content="{{ page_description | escape }}">
  {%- endif -%}
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing

View solution in original post

Replies 5 (5)

oscprofessional
Shopify Partner
15830 2369 3072

Hi,

you want to add in  particular collection or all collection page, where the all collections there !

can you share the page url?

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
ABCbtqmedequip
Excursionist
31 0 2

Looking to add in the all collections page, where all the products are listed. 

Here is the url:

https://abcboutiquemedical.com/collections/all

 

oscprofessional
Shopify Partner
15830 2369 3072

This is an accepted solution.

Hi,

Thought this might be helpful for some of you. If you don't have an SEO plugin that handles it you can edit your theme.liquid file and add something like this:

  {% comment %} Handle certain pages manually which aren't available in the backend such as all products {% endcomment %}
  {%- if collection.title == 'Products' -%}
  {% assign seo_title = "INSERT PAGE TITLE HERE" %}
  {% assign page_description = "INSERT PAGE DESCRIPTION HERE" %}
  {%- endif -%}

I added it right before the opening title tag so it would set those variables before the theme file requested them:

  {% comment %} Handle certain pages manually which aren't available in the backend such as all products {% endcomment %}
  {%- if collection.title == 'Products' -%}
  {% assign seo_title = "INSERT PAGE TITLE HERE" %}
  {% assign page_description = "INSERT PAGE DESCRIPTION HERE" %}
  {%- endif -%}
  <title>{{ seo_title | strip collection.title }}</title>
  {%- if page_description -%}
    <meta name="description" content="{{ page_description | escape }}">
  {%- endif -%}
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
tim
Shopify Expert
3258 232 1178

Actually, there is no need to do code modifications.

Shopify creates virtual collection with handle all which contains all products from your shop, but you can explicitly create collection with title all (so that it handle will be all)  and this collection will be used instead.

You can create it as automatic collection with any broad condition, like "price > 0" or "product available", etc.

After collection is saved, you can then rename it (the handle will stay unchanged), add collection image and description, set sorting order and so on...

KieranR
Shopify Partner
333 27 115

Yeah do Tim's one way easier.

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.