BestValuItems Posted August 16, 2016 Share Posted August 16, 2016 I would like to know how do I remove the sub categories from showing on the category page? I don't want this to show on the page. I have provided a image of what I would like to remove. Also you can take a look at my site at http://bestvalueditems.com as well. Please help me with removing this. Thanks in advance to anyone that is willing to help me with this. Also if it has to do with any html coding I am not able to do that on my own I would need a detailed step by step with that. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 16, 2016 Share Posted August 16, 2016 You will need to find the file templates/content.category.php in your stores file manager. You can usually access this via something called cPanel which you have access to at http://bestvalueditems.com/cpanel. You should have been provided with a password and username by your webhost. Once you log in you will see an icon for file manager. Open this and locate the file in public_html/skins/foundation/templates/content.category.php. Click on the filename and then on the Edit icon/button. Change/Edit {if isset($category.image)} <div class="row"> <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div> </div> {/if} to <!-- {if isset($category.image)} <div class="row"> <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div> </div> {/if} --> Save the file. Quote Link to comment Share on other sites More sharing options...
bsandall Posted August 16, 2016 Share Posted August 16, 2016 To save your future self a lot of headache, you may want to consider using Git to track all changes you make to your code, and make those changes locally first (so you can test them!) before re-uploading the changed files to your server; editing your live files directly is quite the gamble even if you know what you are doing. Not that the above edit is going to break anything - this is just general advice for if you make more than one or two edits to your code. The more edits you make, the more likely something is to go horribly wrong and leave you with a broken site for however long it takes you to track down what went wrong. Using Git, you can just checkout the last known working version, upload it, and then work locally (or on an alternate staging site) to figure out what broke while your live site continues on its merry way. Quote Link to comment Share on other sites More sharing options...
BestValuItems Posted August 18, 2016 Author Share Posted August 18, 2016 Thanks everyone for the help. @ayz1 Thanks for the steps on this. Me and html coding does not get along at all . Thanks again for the help everyone. Quote Link to comment Share on other sites More sharing options...
BestValuItems Posted August 18, 2016 Author Share Posted August 18, 2016 @ayz1 I have followed the steps that you have provided and I still have the sub-categories on the main category page. I have attached pics. Let me know if I did anything wrong. As I stated html coding is really not my thing at all. I really don't understand html coding one bit. On 8/16/2016 at 7:06 AM, ayz1 said: You will need to find the file templates/content.category.php in your stores file manager. You can usually access this via something called cPanel which you have access to at http://bestvalueditems.com/cpanel. You should have been provided with a password and username by your webhost. Once you log in you will see an icon for file manager. Open this and locate the file in public_html/skins/foundation/templates/content.category.php. Click on the filename and then on the Edit icon/button. Change/Edit {if isset($category.image)} <div class="row"> <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div> </div> {/if} to <!-- {if isset($category.image)} <div class="row"> <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div> </div> {/if} --> Save the file. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 18, 2016 Share Posted August 18, 2016 Looks OK. In admin > Maintenance select the clear cache option and then click the submit button. If that doesn't work. Try deleting <!-- {if isset($category.image)} <div class="row"> <div class="small-12 columns"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div> </div> {/if} --> I am assuming you are using the Foundation skin? Or have you renamed it? If so then you need to work in that folder. Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 18, 2016 Share Posted August 18, 2016 The suggested code change (wrapping some code inside HTML comment markers, thus telling the browser to not render that code) will suppress the display of that actual category's image. You want to suppress the display of all that category's sub-categories. To supress the display of the subcats, find this statement: {if isset($SUBCATS) && $SUBCATS} Change to: {if false && isset($SUBCATS) && $SUBCATS} This forces the if test to evaluate to false which will cause nothing to be shown. Quote Link to comment Share on other sites More sharing options...
BestValuItems Posted August 18, 2016 Author Share Posted August 18, 2016 @bsmither Thank you very much for the help. That worked. Quote Link to comment Share on other sites More sharing options...
KRISTINVELLA Posted November 10, 2016 Share Posted November 10, 2016 Hi there, Would anyone be able to help with a code for getting sub-categories to display on responsive sites? They display on the desktop site. Please see screenshots. I am using the foundation skin and would the code go in the same file mentioned above: public_html/skins/foundation/templates/content.category.php Thanks, Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 10, 2016 Share Posted November 10, 2016 According to the template content.category.php, for a medium and wider viewport, there will be a six-across grid. Then, if the Store Settings, Layout tab, 'Expand category navigation tree' is enabled, the sub-cats area is shown only on medium and wider viewports. Otherwise, for a small viewport, there will be shown a three-across grid. So, check that setting. If off, which should show the three-across grid, determine if the sub-cats are actually below the descriptive text (scroll the page). However, I see the SiteDocs, and that is at the bottom of the page. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 10, 2016 Share Posted November 10, 2016 Using the Responsive setting on FireFox, I DO see the subcategories on the phone size view, right after the text. I do see that the long title of the Church and Order of Service Booklets is messing with the lineup of the subcategory images. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.