how i can fix this custom url section not working

i want to add custom page link instead of default collection page I create the section to set custom URL but default collection still overwriting this link

https://g8tiyz-ui.myshopify.com/

Hello!

To override default collection links with custom URLs in Shopify, use conditional Liquid logic within your section’s code. Check if a custom URL setting is filled; if so, link to it; otherwise, use the default collection.url. Add a custom_url setting to your section’s schema. This ensures your custom link takes priority when provided, while defaulting to the collection URL when left blank.

2 Likes

i add this section on schema

{%- assign custom_link = block.settings.custom_link -%}

  {% render 'card-collection',
     card_collection: block.settings.collection,
     media_aspect_ratio: section.settings.image_ratio,
     columns: columns,
     placeholder_image: placeholder_image
  %}