Get Help/Forums/Design Tips & Tricks

How To Edit Template To Not Show All Categories on Home Page

littleonlinestore
posted this on February 26, 2011 02:08

Step 1: Goto your template editor from the Appearance tab. Click on the Home Page file. The editor will open for you. 

Step 2: Find           {{ @include_snippet("sidebar") }}

Change "sidebar" to "sidebarhome" and publish the page

Step 3: Goto the Snippets tab and click on Create New Snippet. Name your snippet sidebarhome

Step 4: Goto the sidebar snippet and copy all of the code. Then, goto the sidebarhome snippet and paste all the code. Publish the snippet.

Step 5: In the sidebarhome snippet find View all categories

Change it to Main Categories or whatever you'd like.

Step 6: Find

                {{ #if($category.subcategorycount > 0) }}
                <ul>
                  {{ #foreach ( $subcategory in $methods.getcategoriesbyparentid($category.id)) }}
                  <li><a href="{{ $subcategory.categorylink }}?pagesize=40">{{ $subcategory.name }}</a><span class="count">{{ $subcategory.productcount }}</span></li>
                  {{ #end }}
                </ul>
                {{ #end }}

and cut it out (cut rather than delete in case you mess up and need to paste it back right away.

Step 7: Publish the snippet.

 

Thanks,

Christi

Please check out my Highwire Toplist http://buyitsellit.gotop100.com

 

Comments

User photo
littleonlinestore

This is for those using templates that show all subcategories on the Home page, and they just want to show main categories.

February 26, 2011 02:22
User photo
littleonlinestore

Forget Step 5......... Leave it View All Categories

Not sure what I was thinking.....my bad.

February 26, 2011 02:51
User photo
monkeysuitvintage

Thanks Christi I will have to check that out!

March 25, 2011 16:37