Cover image by Hans Braxmeier
Unless something has gone drastically wrong, your Shopify 404 page should not be getting a lot of traffic. Most sites shout the number 404 at the user and perhaps splash out on a nice illustration, to commemorate the site's failure to deliver content. But what if we could do more for your customers?
Adding a search box to your 404 page is pretty simple, but what if that search box took your broken URL and added it automagically to the search box?
Finetune Partner's Mannequin 404 template takes the wonky URL and adds it to the search box, first formatting this string, so that all the hyphens, underscores and slashes are removed.
How about we pull in (say) the last three news posts? The next section of the code allows you to pull in as many news posts as you like (starting with the most recent).
current_blog variable with the name of the blog which you'd like to pull in (Shopify stores can have more than one blog on them), then update the
article_count variable, to set how many articles will appear.