Is there a way to show description only on 1st pagination on Dawn theme Collections page?

Has anyone been able to find a way to only show the description on the 1st page of the collections pages?

My shop has several items and the problem is that I am getting duplicate content issues because the pagination on the collection pages have the same description for all pages. I’d like for the collection pages to only show the description on the first page and the others to only show the title without the description.

Hello @JustMeFrank

{% if collection.products.size > 0 %}
{%- assign items_per_page = collection.pagination_per_page -%}
{%- assign current_page = collection.current_page -%}
{%- assign has_pagination = collection.products.size > items_per_page -%}
{%- assign show_description = current_page == 1 -%}

{%- if show_description -%}
{{ collection.description }}
{%- endif -%}

{% for product in collection.products %}

{{ product.title }}

{%- if show_description and product.description -%}

{{ product.description }}

{%- endif -%} {% endfor %}

{%- if has_pagination -%}
{%- if current_page == 1 -%}

Previous Page {{ current_page }} Next
{%- else -%}
Previous Page {{ current_page }} Next
{%- endif -%} {%- endif -%} {% else %}

No products found.

{% endif %}

You can try by above code, If it does not work , I can assist you with this by examining your theme code. Once you approve the collaboration, we can proceed with fixing the issue for you.

1 Like

Where would this code go? I’m on the newest version of Dawn theme.