I sell only one product in my store and would like my home page to become a product page.

To make your home page a product page, you will need to follow the steps in this wiki tutorial: Selling a Single Product on the Homepage. Once you have done all the steps there, come back here, as you will need to complete one final step specific to the New Standard Theme. That last step consists in editing one line of code in your theme.liquid file, line no 79, the line where you have your opening body tag.

Change all this:

<body id="{{ page_title | handle }}" class="{% if customer %}customer-logged-in {% endif %}template-{{ template | split: '.' | first | remove: '/' | remove: '_' }}">

To that:

<body id="{{ page_title | handle }}" class="{% if customer %}customer-logged-in {% endif %}template-{% if template == 'index' %}product{% else %}{{ template | split: '.' | first | remove: '/' | remove: '_' }}{% endif %}">

What we have done here is to give the body tag a class of template-product on the home page, so that all JavaScript that must run on product pages also runs on the home page. Once you have completed that final step, product images will show up on your home page. A sign that you have skipped that step, or done it incorrectly, is that product images won't show up on your home page.

Comment on this post (2 comments)

  • Nag says...

    Hi, when i add this bit of code, the slider (which i want to keep on my home page, along with a product under it) does not show multiple slides, just the first slide and none else.
    How can i get the slider to function properly while keeping my product underneath it.

    August 19, 2013

  • Will says...

    How do I link to a specific part of a page?

    Like you have done under the FAQ section in the sidebar. It smoothly scrolls to the specific section ie #multiple-currencies.

    February 02, 2013

Leave a comment