How can I fix double H1 tags in the Symmetry theme?

Hello,
I have a problem with symmetry theme. I am writing a description for my collections. You can see the images below.
But there are 2 H1 tags. ( Same way )
All I’ve talked about below is for 2 ‘Turkish Rugs’;

There are 2 options to eliminate this problem;

  1. I need to remove the collection name Turkish Rug above the pictures. I tried this myself. With main.collecitons but the theme gave an error. (I don’t have much coding knowledge. I may have done it wrong.) It would be great for me if we could remove the theme name.

  2. My chance to remove this error is as follows; If I put the text and the picture I want in the description of the collection, this problem disappears, but here the following problem arises (Please see the picture 2.jpg)
    The text is centered and looks very ugly on the desktop.
    I want it to be like 1.jpg. (I also use .jpg with my theme feature so ‘image with text’ )

1 Like

Hello @KadirCevik

I would like to give you a solution to support you:

  1. Go to Online Store-> Theme-> Edit code
  2. Open your theme.liquid theme file
  3. Paste the below code before :

<style>
.template-collection .page-header.page-header--with-upper-spacing {
display: none !important;
}

</style>
1 Like

Hi, your code worked. The collection has removed its name, but it still remains as the H1 tag. (Secretly) Can we remove it too?

It enforces the H1 tag with the Image with Text property. If there is no H tags, it does not show the text large.

Thank you

@KadirCevik

Please share our store main-collection.liquid file code.

1 Like

@MandasaTech

Unfortunately this is to solve our problem. Please help me.

@KadirCevik

Could you share the code of main-collection.liquid file? Then I can review it

@ExpertRookie


{% paginate collection.products by section.settings.coll_num_per_page_int %}

{%- liquid
  if section.settings.show_image_behind_heading and collection.image
    assign header_image_enabled = true
  else
    assign header_image_enabled = false
  endif
  assign current_sort = collection.sort_by | default: collection.default_sort_by

  assign show_filters = section.settings.enable_filtering
  if collection.filters == empty
    assign show_filters = false
  endif
-%}

{%- liquid
  if section.settings.enable_subcoll and section.settings.subcoll_menu != blank
    assign current_link_parent = false
    for link in linklists[section.settings.subcoll_menu].links
      if link.links != empty
        if link.type == 'collection_link' and link.object.handle == collection.handle
          assign current_link_parent = link
          break
        elsif link.type == 'catalog_link' and collection.handle == 'all'
          assign current_link_parent = link
          break
        endif
      endif
      if link.links != blank and current_link_parent == false
        for child_link in link.links
          if child_link.type == 'collection_link' and child_link.object.handle == collection.handle
            if child_link.links == empty
              assign current_link_parent = link
            else
              assign current_link_parent = child_link
            endif
            break
          endif
          if child_link.type == 'catalog_link' and collection.handle == 'all'
            if child_link.links == empty
              assign current_link_parent = link
            else
              assign current_link_parent = child_link
            endif
            break
          endif
          if child_link.links != blank and current_link_parent == false
            for child_child_link in child_link.links
              if child_child_link.type == 'collection_link' and child_child_link.object.handle == collection.handle
                assign current_link_parent = child_link
                break
              elsif child_child_link.type == 'catalog_link' and collection.handle == 'all'
                assign current_link_parent = child_link
                break
              endif
            endfor
          endif
        endfor
      endif
    endfor
  endif
-%}

{%- if current_link_parent -%}
  {%- assign subcoll_count = 0 -%}
  {% capture subcollection_html %}
    {% if section.settings.subcoll_style == 'buttons' %}
      

        

          {%- for link in current_link_parent.links -%}
            {%- unless link.object.handle == collection.handle or link.type != 'collection_link' -%}
              {%- assign subcoll_count = subcoll_count | plus: 1 -%}
              {{ link.title | escape }}
            {%- endunless -%}
          {%- endfor -%}
        

      

    {% else %}
      {% unless section.settings.subcoll_gall_full_width %}
        
      {% endunless %}
      

        

          {%- for link in current_link_parent.links -%}
            {%- unless link.object.handle == collection.handle or link.type != 'collection_link' -%}
              {%- assign subcoll_count = subcoll_count | plus: 1 -%}
              

                
                  {%- liquid
                    if link.object.featured_image
                      assign subcoll_image = link.object.featured_image
                    else
                      assign subcoll_image = false
                    endif
                  -%}
                  {%- if subcoll_image -%}
                    

                      
                    

                  {%- else -%}
                    
                      {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
                    

                  {%- endif -%}

                  
                    

                      

                        ## {{ link.title }}
                      

                    

                  

                
              

            {%- endunless -%}
          {%- endfor -%}
        

      

      {% unless section.settings.subcoll_gall_full_width %}
        

      {% endunless %}
    {% endif %}
  {% endcapture %}
  {%- liquid
    if subcoll_count < 2
      assign subcollection_html = ''
    endif
  -%}
{%- endif -%}

{% if header_image_enabled %}
  
    

    
      

      
        

          

            # {{ collection.title | escape }}

            {% if collection.description != blank and section.settings.coll_desc_pos == 'above' %}
              {{ collection.description }}

            {% endif %}

            {%- if current_link_parent and section.settings.subcoll_style == 'buttons' -%}
              {{ subcollection_html }}
            {%- endif -%}
          

        

      

    

  

{% else %}
  {{ subcollection_html }}
  
    

      # {{ collection.title | escape }}

      {% if collection.description != blank and section.settings.coll_desc_pos == 'above' %}
        {{ collection.description }}

      {% endif %}
    

  

{% endif %}

  {%- if current_link_parent and header_image_enabled and section.settings.subcoll_style != 'buttons' -%}
    {{ subcollection_html }}
  {%- endif -%}

  
    

      

        {% if section.settings.coll_show_sort or show_filters %}
          
            {% render 'svg-filter' %}
            {{ 'collections.filtering.filter' | t }}
            {% liquid
              assign filter_count = 0
              for filter in collection.filters
                assign filter_count = filter_count | plus: filter.active_values.size
                if filter.type == 'price_range'
                  if filter.min_value.value != nil or filter.max_value.value != nil
                    assign filter_count = filter_count | plus: 1
                  endif
                endif
              endfor
            %}
            {% if filter_count > 0 %}
              ({{ filter_count }})
            {% endif %}
            {% render 'svg-chevron-right', stroke_width: 1.3 %}
          
        {% endif %}
      

      {% if section.settings.show_total and paginate.items > 0 %}
        
          
{{ 'collections.general.product_count' | t: count: paginate.items }}

        

      {% endif %}

      
        {% if section.settings.coll_show_sort %}
          
            

              
{{ 'collections.sorting.title' | t | escape }}

              
              

                {%- for option in collection.sort_options -%}
                  {%- if option.value != 'manual' or section.settings.coll_show_feat or collection.default_sort_by == 'manual' -%}
                    {{ option.name | escape }}
                  {%- endif -%}
                {%- endfor -%}
              

            

          
        {% endif %}
        
          

            {%- render 'svg-grid', stroke_width: 1.3 -%}
            {%- render 'svg-box', stroke_width: 1.3 -%}
          

        
      

    

    
      {% if section.settings.coll_show_sort or show_filters %}
        {% render 'faceted-filters', filter_context: collection, clear_url: collection.url, current_sort: current_sort %}
      {% endif %}

      

        {% if collection.products.size == 0 %}
          ##### {{ 'collections.general.no_matches' | t }}
        {% else %}
          
            {%- liquid
              if settings.prod_thumb_shape == 'portrait-23'
                assign chosen_aspect_ratio = 0.67
              elsif settings.prod_thumb_shape == 'portrait-45'
                assign chosen_aspect_ratio = 0.8
              elsif settings.prod_thumb_shape == 'square'
                assign chosen_aspect_ratio = 1.0
              elsif settings.prod_thumb_shape == 'landscape-54'
                assign chosen_aspect_ratio = 1.25
              elsif settings.prod_thumb_shape == 'landscape-32'
                assign chosen_aspect_ratio = 1.50
              elsif settings.prod_thumb_shape == 'tallest'
                assign chosen_aspect_ratio = 99
                for product in collection.products
                  if product.featured_media.preview_image.aspect_ratio < chosen_aspect_ratio
                    assign chosen_aspect_ratio = product.featured_media.preview_image.aspect_ratio
                  endif
                endfor
              else
                assign chosen_aspect_ratio = 0
                for product in collection.products
                  if product.featured_media.preview_image.aspect_ratio > chosen_aspect_ratio
                    assign chosen_aspect_ratio = product.featured_media.preview_image.aspect_ratio
                  endif
                endfor
              endif
            -%}
            {% for product in collection.products %}
              {% render 'product-block', product: product, custom_aspect_ratio: chosen_aspect_ratio, animate: true %}
            {% endfor %}
          

        {% endif %}
      

    

  

  {% render 'pagination-control', paginate: paginate %}

  {% endpaginate %}

  {% if collection.description != blank and section.settings.coll_desc_pos == 'below' %}
    
      
{{ collection.description }}

    

  {% endif %}

{% schema %}
  {
    "name": "Collection pages",
    "settings": [
      {
        "type": "header",
        "content": "Heading"
      },
      {
        "type": "checkbox",
        "id": "show_image_behind_heading",
        "label": "Show collection image behind heading",
        "default": true
      },
      {
        "type": "select",
        "id": "heading_image_height",
        "label": "Heading image height",
        "options": [
          {
            "value": "small",
            "label": "Compact"
          },
          {
            "value": "medium",
            "label": "Small"
          },
          {
            "value": "large",
            "label": "Medium"
          },
          {
            "value": "huge",
            "label": "Large"
          }
        ],
        "default": "medium"
      },
      {
        "id": "overlay_style",
        "type": "select",
        "label": "Overlay style",
        "default": "shadow",
        "options": [
          {
            "value": "full",
            "label": "Tint"
          },
          {
            "value": "box",
            "label": "Box"
          },
          {
            "value": "shadow",
            "label": "Text shadow"
          },
          {
            "value": "full image-overlay--bg-shadow",
            "label": "Text shadow and tint"
          },
          {
            "value": "no_background",
            "label": "No background"
          }
        ]
      },
      {
        "type": "header",
        "content": "Layout"
      },
      {
        "type": "range",
        "id": "coll_num_per_page_int",
        "min": 16,
        "max": 50,
        "step": 2,
        "label": "Number of products to show per page",
        "default": 24
      },
      {
        "type": "range",
        "id": "grid",
        "label": "Products per row",
        "min": 2,
        "max": 5,
        "step": 1,
        "default": 4
      },
      {
        "type": "checkbox",
        "id": "show_vendor",
        "label": "Show product vendors",
        "default": false
      },
      {
        "type": "checkbox",
        "id": "show_total",
        "label": "Show product total",
        "default": true
      },
      {
        "type": "select",
        "id": "coll_desc_pos",
        "label": "Description position",
        "default": "above",
        "options": [
          {
            "value": "above",
            "label": "Below collection title"
          },
          {
            "value": "below",
            "label": "Below products"
          }
        ]
      },
      {
        "type": "header",
        "content": "Filters"
      },
      {
        "type": "checkbox",
        "id": "enable_filtering",
        "label": "Enable filtering",
        "info": "[Customize filters](\/admin\/menus)",
        "default": true
      },
      {
        "type": "checkbox",
        "id": "collapse_tag_sidebar_by_default",
        "label": "Collapse filter column",
        "default": false
      },
      {
        "type": "select",
        "id": "collapse_filters_method",
        "label": "Filter row collapse",
        "default": "over-12",
        "options": [
          {
            "value": "none",
            "label": "None"
          },
          {
            "value": "over-6",
            "label": "Over 6 items"
          },
          {
            "value": "over-12",
            "label": "Over 12 items"
          },
          {
            "value": "over-18",
            "label": "Over 18 items"
          },
          {
            "value": "all",
            "label": "All rows"
          }
        ]
      },
      {
        "type": "checkbox",
        "id": "show_filter_counts",
        "label": "Show filter counts",
        "default": false
      },
      {
        "type": "checkbox",
        "id": "show_disabled_filters",
        "label": "Show filters with zero results",
        "default": true
      },
      {
        "type": "checkbox",
        "id": "ajax_products",
        "label": "Filter and sort collections without loading a new page",
        "default": true,
        "info": "Some apps require this to be disabled"
      },
      {
        "type": "checkbox",
        "id": "auto_apply_hide_unavailable",
        "label": "On selecting a filter, automatically apply 'Hide out of stock'",
        "default": false,
        "info": "Requires Availability filter to be enabled"
      },
      {
        "type": "checkbox",
        "id": "enable_sticky_filter",
        "label": "Enable stick on scroll",
        "default": true
      },
      {
        "type": "checkbox",
        "id": "filter_two_columns",
        "label": "Two column filter values",
        "default": false
      },
      {
        "type": "checkbox",
        "id": "coll_show_sort",
        "label": "Show sorting dropdown",
        "default": true
      },
      {
        "type": "checkbox",
        "id": "coll_show_feat",
        "label": "Show 'Featured' in sorting dropdown",
        "default": false
      },
      {
        "type": "header",
        "content": "Subcollections"
      },
      {
        "type": "paragraph",
        "content": "The current collection is located in the menu, and any other collections within that dropdown menu are displayed. [Read more](https://cleancanvas.co.uk/support/symmetry/subcollections)"
      },
      {
        "type": "checkbox",
        "id": "enable_subcoll",
        "label": "Enable subcollections",
        "info": "A menu must be selected below",
        "default": true
      },
      {
        "type": "link_list",
        "id": "subcoll_menu",
        "label": "Subcollections menu",
        "info": "This is usually your main menu",
        "default": "main-menu"
      },
      {
        "type": "select",
        "id": "subcoll_style",
        "label": "Subcollections style",
        "default": "buttons",
        "options": [
          {
            "value": "buttons",
            "label": "Buttons"
          },
          {
            "value": "gallery",
            "label": "Gallery"
          }
        ]
      },
      {
        "type": "header",
        "content": "Subcollection gallery layout"
      },
      {
        "type": "select",
        "id": "subcoll_gall_shape",
        "label": "Image shape",
        "default": "sq",
        "options": [
          {
            "value": "l-21",
            "label": "Landscape (2x1)"
          },
          {
            "value": "l-64",
            "label": "Landscape (6x4)"
          },
          {
            "value": "l-5x4",
            "label": "Landscape (5x4)"
          },
          {
            "value": "sq",
            "label": "Square (1x1)"
          },
          {
            "value": "p-4x5",
            "label": "Portrait (4x5)"
          }
        ]
      },
      {
        "type": "select",
        "id": "image_position",
        "label": "Image alignment",
        "info": "Used to keep the subject of your image in view",
        "default": "center center",
        "options": [
          {
            "value": "top left",
            "label": "Top left"
          },
          {
            "value": "top center",
            "label": "Top center"
          },
          {
            "value": "top right",
            "label": "Top right"
          },
          {
            "value": "center left",
            "label": "Middle left"
          },
          {
            "value": "center center",
            "label": "Middle center"
          },
          {
            "value": "center right",
            "label": "Middle right"
          },
          {
            "value": "bottom left",
            "label": "Bottom left"
          },
          {
            "value": "bottom center",
            "label": "Bottom center"
          },
          {
            "value": "bottom right",
            "label": "Bottom right"
          }
        ]
      },
      {
        "id": "subcoll_gall_enable_margin",
        "type": "checkbox",
        "label": "Add spacing",
        "default": true
      },
      {
        "id": "subcoll_gall_full_width",
        "type": "checkbox",
        "label": "Full page width",
        "default": false
      },
      {
        "id": "subcoll_gall_overlay_style",
        "type": "select",
        "label": "Overlay style",
        "default": "shadow",
        "options": [
          {
            "value": "full",
            "label": "Tint"
          },
          {
            "value": "box",
            "label": "Box"
          },
          {
            "value": "shadow",
            "label": "Text shadow"
          },
          {
            "value": "full image-overlay--bg-shadow",
            "label": "Text shadow and tint"
          },
          {
            "value": "no_background",
            "label": "No background"
          }
        ]
      },
      {
        "type": "select",
        "id": "subcoll_gall_text_alignment",
        "label": "Text overlay position",
        "options": [
          {
            "value": "top left",
            "label": "Top left"
          },
          {
            "value": "top center",
            "label": "Top center"
          },
          {
            "value": "top right",
            "label": "Top right"
          },
          {
            "value": "center center",
            "label": "Middle"
          },
          {
            "value": "bottom left",
            "label": "Bottom left"
          },
          {
            "value": "bottom center",
            "label": "Bottom center"
          },
          {
            "value": "bottom right",
            "label": "Bottom right"
          }
        ],
        "default": "center center"
      },
      {
        "type": "select",
        "id": "subcoll_gall_mobile_layout",
        "label": "Mobile layout",
        "info": "Mobile layout always uses 5x4 images",
        "default": "2",
        "options": [
          {
            "value": "1",
            "label": "1 item"
          },
          {
            "value": "2",
            "label": "2 items"
          },
          {
            "value": "hide",
            "label": "Hide"
          }
        ]
      }
    ]
  }
{% endschema %}

@ExpertRookie

If you can fix the problem, I can authorize you on the website.

HI @KadirCevik
Please share the access, then we will help you.

Hi @ExpertRookie

I have authorized you. The following theme codes with your name will be arranged.

Thank you

@ExpertRookie Please let me know when you fix the problem

Hello, @ExpertRookie
Did you see that I gave you permission?

Thank you

Hello @KadirCevik,

Just checking, do you still need help with the issue?

@KadirCevik
Try this code.

{% paginate collection.products by section.settings.coll_num_per_page_int %}

{%- liquid
  if section.settings.show_image_behind_heading and collection.image
    assign header_image_enabled = true
  else
    assign header_image_enabled = false
  endif
  assign current_sort = collection.sort_by | default: collection.default_sort_by

  assign show_filters = section.settings.enable_filtering
  if collection.filters == empty
    assign show_filters = false
  endif
-%}

{%- liquid
  if section.settings.enable_subcoll and section.settings.subcoll_menu != blank
    assign current_link_parent = false
    for link in linklists[section.settings.subcoll_menu].links
      if link.links != empty
        if link.type == 'collection_link' and link.object.handle == collection.handle
          assign current_link_parent = link
          break
        elsif link.type == 'catalog_link' and collection.handle == 'all'
          assign current_link_parent = link
          break
        endif
      endif
      if link.links != blank and current_link_parent == false
        for child_link in link.links
          if child_link.type == 'collection_link' and child_link.object.handle == collection.handle
            if child_link.links == empty
              assign current_link_parent = link
            else
              assign current_link_parent = child_link
            endif
            break
          endif
          if child_link.type == 'catalog_link' and collection.handle == 'all'
            if child_link.links == empty
              assign current_link_parent = link
            else
              assign current_link_parent = child_link
            endif
            break
          endif
          if child_link.links != blank and current_link_parent == false
            for child_child_link in child_link.links
              if child_child_link.type == 'collection_link' and child_child_link.object.handle == collection.handle
                assign current_link_parent = child_link
                break
              elsif child_child_link.type == 'catalog_link' and collection.handle == 'all'
                assign current_link_parent = child_link
                break
              endif
            endfor
          endif
        endfor
      endif
    endfor
  endif
-%}

{%- if current_link_parent -%}
  {%- assign subcoll_count = 0 -%}
  {% capture subcollection_html %}
    {% if section.settings.subcoll_style == 'buttons' %}

      {%- for link in current_link_parent.links -%}
        {%- unless link.object.handle == collection.handle or link.type != 'collection_link' -%}
          {%- assign subcoll_count = subcoll_count | plus: 1 -%}
          {{ link.title | escape }}
        {%- endunless -%}
      {%- endfor -%}

    {% else %}
      {% unless section.settings.subcoll_gall_full_width %}
      {% endunless %}

      {%- for link in current_link_parent.links -%}
        {%- unless link.object.handle == collection.handle or link.type != 'collection_link' -%}
          {%- assign subcoll_count = subcoll_count | plus: 1 -%}

          {%- liquid
            if link.object.featured_image
              assign subcoll_image = link.object.featured_image
            else
              assign subcoll_image = false
            endif
          -%}

          {%- if subcoll_image -%}
          {%- else -%}
            {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
          {%- endif -%}

          ## {{ link.title }}

        {%- endunless -%}
      {%- endfor -%}

      {% unless section.settings.subcoll_gall_full_width %}
      {% endunless %}
    {% endif %}
  {% endcapture %}
  {%- liquid
    if subcoll_count < 2
      assign subcollection_html = ''
    endif
  -%}
{%- endif -%}

{% if header_image_enabled %}

  {%- comment -%}
  # {{ collection.title | escape }}
  {%- endcomment -%}

  {% if collection.description != blank and section.settings.coll_desc_pos == 'above' %}
    {{ collection.description }}
  {% endif %}

  {%- if current_link_parent and section.settings.subcoll_style == 'buttons' -%}
    {{ subcollection_html }}
  {%- endif -%}

{% else %}

  {{ subcollection_html }}

  {%- comment -%}
  # {{ collection.title | escape }}
  {%- endcomment -%}

  {% if collection.description != blank and section.settings.coll_desc_pos == 'above' %}
    {{ collection.description }}
  {% endif %}

{% endif %}

{%- if current_link_parent and header_image_enabled and section.settings.subcoll_style != 'buttons' -%}
  {{ subcollection_html }}
{%- endif -%}

{% if section.settings.coll_show_sort or show_filters %}
  {% render 'svg-filter' %}
  {{ 'collections.filtering.filter' | t }}
  {% liquid
    assign filter_count = 0
    for filter in collection.filters
      assign filter_count = filter_count | plus: filter.active_values.size
      if filter.type == 'price_range'
        if filter.min_value.value != nil or filter.max_value.value != nil
          assign filter_count = filter_count | plus: 1
        endif
      endif
    endfor
  %}
  {% if filter_count > 0 %}
    ({{ filter_count }})
  {% endif %}
  {% render 'svg-chevron-right', stroke_width: 1.3 %}
{% endif %}

{% if section.settings.show_total and paginate.items > 0 %}
  {{ 'collections.general.product_count' | t: count: paginate.items }}
{% endif %}

{% if section.settings.coll_show_sort %}
  {{ 'collections.sorting.title' | t | escape }}

  {%- for option in collection.sort_options -%}
    {%- if option.value != 'manual' or section.settings.coll_show_feat or collection.default_sort_by == 'manual' -%}
      {{ option.name | escape }}
    {%- endif -%}
  {%- endfor -%}

{% endif %}

{% render 'faceted-filters', filter_context: collection, clear_url: collection.url, current_sort: current_sort %}

{% if collection.products.size == 0 %}
  ##### {{ 'collections.general.no_matches' | t }}
{% else %}

  {%- liquid
    if settings.prod_thumb_shape == 'portrait-23'
      assign chosen_aspect_ratio = 0.67
    elsif settings.prod_thumb_shape == 'portrait-45'
      assign chosen_aspect_ratio = 0.8
    elsif settings.prod_thumb_shape == 'square'
      assign chosen_aspect_ratio = 1.0
    elsif settings.prod_thumb_shape == 'landscape-54'
      assign chosen_aspect_ratio = 1.25
    elsif settings.prod_thumb_shape == 'landscape-32'
      assign chosen_aspect_ratio = 1.50
    elsif settings.prod_thumb_shape == 'tallest'
      assign chosen_aspect_ratio = 99
      for product in collection.products
        if product.featured_media.preview_image.aspect_ratio < chosen_aspect_ratio
          assign chosen_aspect_ratio = product.featured_media.preview_image.aspect_ratio
        endif
      endfor
    else
      assign chosen_aspect_ratio = 0
      for product in collection.products
        if product.featured_media.preview_image.aspect_ratio > chosen_aspect_ratio
          assign chosen_aspect_ratio = product.featured_media.preview_image.aspect_ratio
        endif
      endfor
    endif
  -%}

  {% for product in collection.products %}
    {% render 'product-block', product: product, custom_aspect_ratio: chosen_aspect_ratio, animate: true %}
  {% endfor %}

{% endif %}

{% render 'pagination-control', paginate: paginate %}

{% endpaginate %}

{% if collection.description != blank and section.settings.coll_desc_pos == 'below' %}
  {{ collection.description }}
{% endif %}

{% schema %}
  {{ schema }}
{% endschema %}

Best regards,
Devcoder :laptop: