A user wants to automatically generate a list of all Shopify pages on a single page using Liquid/Twig code. They attempted to insert Liquid code directly into a page’s content editor, but discovered that custom Liquid doesn’t execute in page descriptions.
Solution provided:
Create a new page in Shopify admin
Build a separate page template in the theme files
Add the Liquid code (looping through pages object) to this custom template
Assign the custom template to the page through theme customization
Alternatively, add a custom liquid section to the template
Follow-up discussion:
A later participant asked about filtering pages by URL prefix (e.g., showing only pages under /pages/forfattare/xxxx/). The suggested approach was using metaobject pages with custom templates, though concerns were raised about their discoverability—they appear in sitemaps but may not show in standard page searches or navigation without manual configuration.
Summarized with AI on November 10.
AI used: claude-sonnet-4-5-20250929.
Yes, it will be automatic list of all pages on the website but you have to put your code in liquid, in page content, liquid code does not work.
Thanks!
Add that code in directly in theme code in that template or add a custom liquid section in newly created template
Please check if you are able to do that on your side or you need more assistance.
Thanks!
thanks for this solution! But I wonder if there is a way to show only a certain type of pages? For example pages with the prefix “/pages/forfattare/xxxx”.
This is exactly what I have done. But now I want to show these metaobject pages for the visitor (and for Google) in a good way. I can’t find out how I can showcase them. If it were a blog I could create a page and set up a section for showing blog posts, but all these metaobject pages is just there in the background - hopefully Google find them with the sitemap (seems to be present there), but a visitor can’t find them at all. These pages isn’t even searchable - though I have asked Search & Discovery to show search results for “Pages” - it seems only show manual, ordinary pages.
Those are already searchable if you have enabled them from metaobject definition. And those are included in sitemap as well. To show them to the visitor you can add them to navigation, you can add other sections to these from metaobject page template and you can get their link from content tab in left side bar in admin